Skip to contentSkip to conversation

How about issueing conntrack event in init_conntrack()?

DISCUSSION Daniel 2 participants 2 messages Nov 15, 2007 netfilter

lore
Share & tools
lore

Daniel

author
#0 lore raw

hi, all

We all know event IPCT_NEW is issued whenever conntrack is confirmed, then how about issueing a IPCT_INIT event in init_conntrack()? IPCT_INIT indicates that one IP is trying to create a connection, maybe we can catch these kind of events, do some analyzation work, and block the evil *attempting* packet(this will prevent conntrack being confirmed).

Is this make any sense?

Thanks :-)

Daniel
2007-11-15

#1 lore raw
Quoted 6 lines · Daniel

hi, all

We all know event IPCT_NEW is issued whenever conntrack is confirmed,
then how about issueing a IPCT_INIT event in init_conntrack()? IPCT_INIT indicates that one IP is trying to create a connection, maybe we can catch these kind of events, do some analyzation work, and block the evil *attempting* packet(this will prevent conntrack being confirmed).

Is this make any sense?

That wouldn't work since the connection is going to be confirmed before you get a chance to do something. On SMP it might work, but would be racy. In general ctnetlink events relate to the conntrack table, so we don't want to send events for connections that are not confirmed.