summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPhil Oester <kernel@linuxace.com>2005-06-21 14:02:42 -0700
committerDavid S. Miller <davem@davemloft.net>2005-06-21 14:02:42 -0700
commit1d3cdb41f52e299f70b66cbb569bff5216f3643a (patch)
tree519f0feab4b0481bbb7c6298a82485071a0acbe4 /net
parente98231858bbfd2aca42f93d55133c2fca6df00f9 (diff)
downloadlinux-stable-1d3cdb41f52e299f70b66cbb569bff5216f3643a.tar.gz
linux-stable-1d3cdb41f52e299f70b66cbb569bff5216f3643a.tar.bz2
linux-stable-1d3cdb41f52e299f70b66cbb569bff5216f3643a.zip
[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 Signed-off-by: Phil Oester <kernel@linuxace.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/ip_conntrack_core.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index ffba0ad3c880..4b78ebeb6635 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -760,15 +760,11 @@ static void ip_conntrack_expect_insert(struct ip_conntrack_expect *exp)
exp->master->expecting++;
list_add(&exp->list, &ip_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);
CONNTRACK_STAT_INC(expect_create);
}