tree 1f480a6f147ace8c4fbaad5e94bca88152bba30d
parent 1444fc559b01aa5d4fedf4ee4f306a9e9cd56f95
author Pablo Neira Ayuso <[EMAIL PROTECTED]> Wed, 10 Aug 2005 10:05:52 -0700
committer David S. Miller <[EMAIL PROTECTED]> Tue, 30 Aug 2005 05:40:13 -0700

[NETFILTER]: ctnetlink: make sure event order is correct

The following sequence is displayed during events dumping of an ICMP
connection: [NEW] [DESTROY] [UPDATE]

This happens because the event IPCT_DESTROY is delivered in
death_by_timeout(), that is called from the icmp protocol helper
(ct->timeout.function) once we see the reply.

To fix this, we move this event to destroy_conntrack().

Signed-off-by: Pablo Neira Ayuso <[EMAIL PROTECTED]>
Signed-off-by: Harald Welte <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/ipv4/netfilter/ip_conntrack_core.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/netfilter/ip_conntrack_core.c 
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -316,6 +316,7 @@ destroy_conntrack(struct nf_conntrack *n
        IP_NF_ASSERT(atomic_read(&nfct->use) == 0);
+       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 lo
        struct ip_conntrack *ct = (void *)ul_conntrack;
-       ip_conntrack_event(IPCT_DESTROY, ct);
        /* Inside lock so preempt is disabled on module removal path.
         * Otherwise we can get spurious warnings. */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to