|
@@ -635,8 +635,12 @@ static noinline int early_drop(struct net *net, unsigned int hash)
|
|
|
|
|
|
if (del_timer(&ct->timeout)) {
|
|
|
death_by_timeout((unsigned long)ct);
|
|
|
- dropped = 1;
|
|
|
- NF_CT_STAT_INC_ATOMIC(net, early_drop);
|
|
|
+ /* Check if we indeed killed this entry. Reliable event
|
|
|
+ delivery may have inserted it into the dying list. */
|
|
|
+ if (test_bit(IPS_DYING_BIT, &ct->status)) {
|
|
|
+ dropped = 1;
|
|
|
+ NF_CT_STAT_INC_ATOMIC(net, early_drop);
|
|
|
+ }
|
|
|
}
|
|
|
nf_ct_put(ct);
|
|
|
return dropped;
|