[PATCH 6/8] netfilter: Add comment above remove_expectations in destroy_conntrack()

Rusty Russell rusty at rustcorp.com.au
Fri Dec 31 12:41:35 CET 2004


Name: Add comment above remove_expectations in destroy_conntrack()
Status: Trivial
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

I removed this code in a previous patch, and Patrick McHardy explained
what was wrong.  Add a comment.

Index: linux-2.6.10-bk1-Netfilter/net/ipv4/netfilter/ip_conntrack_core.c
===================================================================
--- linux-2.6.10-bk1-Netfilter.orig/net/ipv4/netfilter/ip_conntrack_core.c	2004-12-28 12:41:40.731242496 +1100
+++ linux-2.6.10-bk1-Netfilter/net/ipv4/netfilter/ip_conntrack_core.c	2004-12-28 12:43:37.739454544 +1100
@@ -299,7 +299,10 @@
 		ip_conntrack_destroyed(ct);
 
 	WRITE_LOCK(&ip_conntrack_lock);
-	/* Make sure don't leave any orphaned expectations lying around */
+	/* Expectations will have been removed in clean_from_lists,
+	 * except TFTP can create an expectation on the first packet,
+	 * before connection is in the list, so we need to clean here,
+	 * too. */
 	if (ct->expecting)
 		remove_expectations(ct, 1);
 

-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman




More information about the netfilter-devel mailing list