]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables -Z clears the per-rule counters, but not the chain policy counters (Andy...
authorAndy Gay <andy@andynet.net>
Tue, 22 Aug 2006 02:56:41 +0000 (02:56 +0000)
committerPatrick McHardy <kaber@trash.net>
Tue, 22 Aug 2006 02:56:41 +0000 (02:56 +0000)
https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=502

libiptc/libiptc.c

index 779df34be2c7544589e5ef00a4fecd9e751deeb8..feb4379cc00b312064e1afd487d6b92ae91292dc 100644 (file)
@@ -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;