Skip to contentSkip to conversation

netfilter: Add comment above remove_expectations in destroy_conntrack()

PATCH New Rusty Russell 1 participant 1 message Dec 31, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Name: Add comment above remove_expectations in destroy_conntrack()
Status: Trivial

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

net/ipv4/netfilter/ip_conntrack_core.c +4 -1
Index: linux-2.6.10-bk1-Netfilter/net/ipv4/netfilter/ip_conntrack_core.c
===================================================================
@@ -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);
 
Signature · 1 line
A bad analogy is like a leaky screwdriver -- Richard Braakman