[netfilter-cvslog] r6665 - trunk/iptables/libiptc

kaber at netfilter.org kaber at netfilter.org
Tue Aug 22 04:56:42 CEST 2006


Author: kaber at netfilter.org
Date: 2006-08-22 04:56:41 +0200 (Tue, 22 Aug 2006)
New Revision: 6665

Modified:
   trunk/iptables/libiptc/libiptc.c
Log:
[PATCH]: iptables -Z clears the per-rule counters, but not the chain policy counters (Andy Gay <andy at andynet.net>)

https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=502


Modified: trunk/iptables/libiptc/libiptc.c
===================================================================
--- trunk/iptables/libiptc/libiptc.c	2006-08-16 11:42:57 UTC (rev 6664)
+++ trunk/iptables/libiptc/libiptc.c	2006-08-22 02:56:41 UTC (rev 6665)
@@ -1656,6 +1656,9 @@
 		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;




More information about the netfilter-cvslog mailing list