diff options
author | David S. Miller <davem@davemloft.net> | 2012-03-19 03:29:41 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-19 03:29:41 (GMT) |
commit | 4da0bd736552e6377b407b3c3d3ae518ebbdd269 (patch) | |
tree | f0da9f843b8033565c3ca4103fccb17a60688326 /net/netfilter | |
parent | 81a430ac1b88b0702c57d2513e247317e810e04d (diff) | |
parent | c16fa4f2ad19908a47c63d8fa436a1178438c7e7 (diff) | |
download | linux-4da0bd736552e6377b407b3c3d3ae518ebbdd269.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 2124977..ca7e835 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -967,20 +967,21 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb, } } - if (nf_conntrack_event_report(IPCT_DESTROY, ct, - NETLINK_CB(skb).pid, - nlmsg_report(nlh)) < 0) { + if (del_timer(&ct->timeout)) { + if (nf_conntrack_event_report(IPCT_DESTROY, ct, + NETLINK_CB(skb).pid, + nlmsg_report(nlh)) < 0) { + nf_ct_delete_from_lists(ct); + /* we failed to report the event, try later */ + nf_ct_insert_dying_list(ct); + nf_ct_put(ct); + return 0; + } + /* death_by_timeout would report the event again */ + set_bit(IPS_DYING_BIT, &ct->status); nf_ct_delete_from_lists(ct); - /* we failed to report the event, try later */ - nf_ct_insert_dying_list(ct); nf_ct_put(ct); - return 0; } - - /* death_by_timeout would report the event again */ - set_bit(IPS_DYING_BIT, &ct->status); - - nf_ct_kill(ct); nf_ct_put(ct); return 0; |