diff options
author | Patrick McHardy <kaber@trash.net> | 2008-06-09 18:59:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-09 18:59:06 -0400 |
commit | 51091764f26ec36c02e35166f083193a30f426fc (patch) | |
tree | b7103b8d892d4c4b2138437406e2e4be1be13b16 /net/ipv4 | |
parent | 31d8519c9cf87e9d8a0cc5b9734fda02af66d7e2 (diff) |
netfilter: nf_conntrack: add nf_ct_kill()
Encapsulate the common
if (del_timer(&ct->timeout))
ct->timeout.function((unsigned long)ct)
sequence in a new function.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index 78ab19accace..0e21a46184fb 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -87,9 +87,8 @@ static int icmp_packet(struct nf_conn *ct, | |||
87 | means this will only run once even if count hits zero twice | 87 | means this will only run once even if count hits zero twice |
88 | (theoretically possible with SMP) */ | 88 | (theoretically possible with SMP) */ |
89 | if (CTINFO2DIR(ctinfo) == IP_CT_DIR_REPLY) { | 89 | if (CTINFO2DIR(ctinfo) == IP_CT_DIR_REPLY) { |
90 | if (atomic_dec_and_test(&ct->proto.icmp.count) | 90 | if (atomic_dec_and_test(&ct->proto.icmp.count)) |
91 | && del_timer(&ct->timeout)) | 91 | nf_ct_kill(ct); |
92 | ct->timeout.function((unsigned long)ct); | ||
93 | } else { | 92 | } else { |
94 | atomic_inc(&ct->proto.icmp.count); | 93 | atomic_inc(&ct->proto.icmp.count); |
95 | nf_conntrack_event_cache(IPCT_PROTOINFO_VOLATILE, skb); | 94 | nf_conntrack_event_cache(IPCT_PROTOINFO_VOLATILE, skb); |