mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
31d8519c9c
commit
51091764f2
7 changed files with 18 additions and 16 deletions
|
|
@ -87,9 +87,8 @@ static int icmp_packet(struct nf_conn *ct,
|
|||
means this will only run once even if count hits zero twice
|
||||
(theoretically possible with SMP) */
|
||||
if (CTINFO2DIR(ctinfo) == IP_CT_DIR_REPLY) {
|
||||
if (atomic_dec_and_test(&ct->proto.icmp.count)
|
||||
&& del_timer(&ct->timeout))
|
||||
ct->timeout.function((unsigned long)ct);
|
||||
if (atomic_dec_and_test(&ct->proto.icmp.count))
|
||||
nf_ct_kill(ct);
|
||||
} else {
|
||||
atomic_inc(&ct->proto.icmp.count);
|
||||
nf_conntrack_event_cache(IPCT_PROTOINFO_VOLATILE, skb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue