diff options
author | Andy Gay <andy@andynet.net> | 2006-08-22 02:56:41 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2006-08-22 02:56:41 +0000 |
commit | e5bd1d779fab33353c1dc2d2fa49db639dcebd38 (patch) | |
tree | 742258d4c161cb345a891dfb34983ef4115728b8 /libiptc | |
parent | ae35309923339354b48adac4fa703bd3f5e6dd2b (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.c | 3 |
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; |