summaryrefslogtreecommitdiffstats
path: root/libiptc
diff options
context:
space:
mode:
authorAndy Gay <andy@andynet.net>2006-08-22 02:56:41 +0000
committerPatrick McHardy <kaber@trash.net>2006-08-22 02:56:41 +0000
commite5bd1d779fab33353c1dc2d2fa49db639dcebd38 (patch)
tree742258d4c161cb345a891dfb34983ef4115728b8 /libiptc
parentae35309923339354b48adac4fa703bd3f5e6dd2b (diff)
iptables -Z clears the per-rule counters, but not the chain policy counters (Andy Gay <andy@andynet.net>)
https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=502
Diffstat (limited to 'libiptc')
-rw-r--r--libiptc/libiptc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c
index 779df34b..feb4379c 100644
--- a/libiptc/libiptc.c
+++ b/libiptc/libiptc.c
@@ -1656,6 +1656,9 @@ TC_ZERO_ENTRIES(const IPT_CHAINLABEL chain, TC_HANDLE_T *handle)
return 0;
}
+ if (c->counter_map.maptype == COUNTER_MAP_NORMAL_MAP)
+ c->counter_map.maptype = COUNTER_MAP_ZEROED;
+
list_for_each_entry(r, &c->rules, list) {
if (r->counter_map.maptype == COUNTER_MAP_NORMAL_MAP)
r->counter_map.maptype = COUNTER_MAP_ZEROED;