Skip to contentSkip to conversation

IS THIS A BUG? (ip_conntrack_core.c)

DISCUSSION Ned Ren 1 participant 1 message Oct 17, 2003 netfilter

lore
Share & tools
lore

Ned Ren

author
#0 lore raw

Hi,

Maybe I'm not seeing deep enough, or maybe this is a bug? Could someone explain this code to me pls? This code is in all kernel versions.

"ip_conntrack_core.c"
static int early_drop(struct list_head *chain) {
 ......

 if (del_timer(&h->ctrack->timeout)) { death_by_timeout((unsigned long)h->ctrack); <==== dropped = 1;
 }
 ip_conntrack_put(h->ctrack); <==== ???? return dropped;
}

At the end of death_by_timeout(), there is already an ip_conntrack_put(contrack). Is this double freeing here? Probably this is not causing any problems, but is this a bug?

And same thing in ip_ct_selective_cleanup().

Thank you!!

Ned