[netfilter-cvslog] r6915 - in trunk/conntrack-tools: . src

pablo at netfilter.org pablo at netfilter.org
Thu Jul 19 19:13:41 CEST 2007


Author: pablo at netfilter.org
Date: 2007-07-19 19:13:40 +0200 (Thu, 19 Jul 2007)
New Revision: 6915

Modified:
   trunk/conntrack-tools/ChangeLog
   trunk/conntrack-tools/src/cache_iterators.c
Log:
- simplify cache_flush function: use cache_del()


Modified: trunk/conntrack-tools/ChangeLog
===================================================================
--- trunk/conntrack-tools/ChangeLog	2007-07-19 15:13:22 UTC (rev 6914)
+++ trunk/conntrack-tools/ChangeLog	2007-07-19 17:13:40 UTC (rev 6915)
@@ -14,6 +14,7 @@
 o remove major use of libnfnetlink functions: use libnetfilter_conntrack API
 o deprecate conntrackd -F, use conntrack -F instead
 o major rework of the network infrastructure: much simple, less messy
+o simplify cache_flush function: use cache_del()
 
 = conntrack =
 o better protocol argument checkings

Modified: trunk/conntrack-tools/src/cache_iterators.c
===================================================================
--- trunk/conntrack-tools/src/cache_iterators.c	2007-07-19 15:13:22 UTC (rev 6914)
+++ trunk/conntrack-tools/src/cache_iterators.c	2007-07-19 17:13:40 UTC (rev 6915)
@@ -148,25 +148,14 @@
 {
 	struct cache *c = data1;
 	struct us_conntrack *u = data2;
-	void *data = u->data;
-	int i;
 
-	for (i = 0; i < c->num_features; i++) {
-		c->features[i]->destroy(u, data);
-		data += c->features[i]->size;
-	}
+	cache_del(c, u->ct);
 
-	if (c->extra && c->extra->destroy)
-		c->extra->destroy(u, ((void *) u) + c->extra_offset);
-
-	free(u->ct);
-
 	return 0;
 }
 
 void cache_flush(struct cache *c)
 {
 	hashtable_iterate(c->h, c, do_flush);
-	hashtable_flush(c->h);
 	c->flush++;
 }




More information about the netfilter-cvslog mailing list