Skip to contentSkip to conversation

expectation timeouts are compulsory

PATCH In review Yasuyuki KOZAKAI 1 participant 1 message Jun 30, 2005

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

PATCH 5/6 expectation timeouts are compulsory

This patch follows the recent changes to ip_conntrack.

---

[NETFILTER]: expectation timeouts are compulsory

Since expectation timeouts were made compulsory [1], there is no need to

check for them in ip_conntrack_expect_insert.

[1] https://lists.netfilter.org/pipermail/netfilter-devel/2005-January/018143.html

-----------------------------------------------------------------
Yasuyuki Kozakai @ USAGI Project <[email protected]>

net/netfilter/nf_conntrack_core.c (mode:100644) +5 -9
Index: net/netfilter/nf_conntrack_core.c
===================================================================
@@ -1003,15 +1003,11 @@
 	exp->master->expecting++;
 	list_add(&exp->list, &nf_conntrack_expect_list);
 
-	if (exp->master->helper->timeout) {
-		init_timer(&exp->timeout);
-		exp->timeout.data = (unsigned long)exp;
-		exp->timeout.function = expectation_timed_out;
-		exp->timeout.expires
-			= jiffies + exp->master->helper->timeout * HZ;
-		add_timer(&exp->timeout);
-	} else
-		exp->timeout.function = NULL;
+	init_timer(&exp->timeout);
+	exp->timeout.data = (unsigned long)exp;
+	exp->timeout.function = expectation_timed_out;
+	exp->timeout.expires = jiffies + exp->master->helper->timeout * HZ;
+	add_timer(&exp->timeout);
 
 	NF_CT_STAT_INC(expect_create);
 }