]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/netfilter/ip_conntrack_core.c
[NETFILTER]: ctnetlink: make sure event order is correct
[linux-2.6-omap-h63xx.git] / net / ipv4 / netfilter / ip_conntrack_core.c
index 5c3f16eae2d83ff537da0081aa0f31274cc0d421..dace93eacc5c1b05938455551159286a4e245f0f 100644 (file)
@@ -316,6 +316,7 @@ destroy_conntrack(struct nf_conntrack *nfct)
        IP_NF_ASSERT(atomic_read(&nfct->use) == 0);
        IP_NF_ASSERT(!timer_pending(&ct->timeout));
 
+       ip_conntrack_event(IPCT_DESTROY, ct);
        set_bit(IPS_DYING_BIT, &ct->status);
 
        /* To make sure we don't get any weird locking issues here:
@@ -355,7 +356,6 @@ static void death_by_timeout(unsigned long ul_conntrack)
 {
        struct ip_conntrack *ct = (void *)ul_conntrack;
 
-       ip_conntrack_event(IPCT_DESTROY, ct);
        write_lock_bh(&ip_conntrack_lock);
        /* Inside lock so preempt is disabled on module removal path.
         * Otherwise we can get spurious warnings. */