aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_netlink.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 10687692831e..b49da6c925b3 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -943,20 +943,21 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb,
943 } 943 }
944 } 944 }
945 945
946 if (nf_conntrack_event_report(IPCT_DESTROY, ct, 946 if (del_timer(&ct->timeout)) {
947 NETLINK_CB(skb).pid, 947 if (nf_conntrack_event_report(IPCT_DESTROY, ct,
948 nlmsg_report(nlh)) < 0) { 948 NETLINK_CB(skb).pid,
949 nlmsg_report(nlh)) < 0) {
950 nf_ct_delete_from_lists(ct);
951 /* we failed to report the event, try later */
952 nf_ct_insert_dying_list(ct);
953 nf_ct_put(ct);
954 return 0;
955 }
956 /* death_by_timeout would report the event again */
957 set_bit(IPS_DYING_BIT, &ct->status);
949 nf_ct_delete_from_lists(ct); 958 nf_ct_delete_from_lists(ct);
950 /* we failed to report the event, try later */
951 nf_ct_insert_dying_list(ct);
952 nf_ct_put(ct); 959 nf_ct_put(ct);
953 return 0;
954 } 960 }
955
956 /* death_by_timeout would report the event again */
957 set_bit(IPS_DYING_BIT, &ct->status);
958
959 nf_ct_kill(ct);
960 nf_ct_put(ct); 961 nf_ct_put(ct);
961 962
962 return 0; 963 return 0;