All of lore.kernel.org
 help / color / mirror / Atom feed
* remove connections notification by conntrack?
@ 2006-09-22 11:59 Thomas Mader
  2006-09-22 12:58 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Mader @ 2006-09-22 11:59 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]

Hello,

We wrote a netfilter module which is using conntrack to distinguish different 
connections. We only need this for UDP "connections" and we use the following 
functions from conntrack to achieve that.

	proto = ip_conntrack_proto_find_get(skb->nh.iph->protocol);
	if (ip_ct_get_tuple(skb->nh.iph, skb, skb->nh.iph->ihl*4, &tuple,proto)) {
		h = ip_conntrack_find_get(&tuple, NULL);
		....
	}

We use the connection IDs of conntrack to distinguish between the connections 
within a list.
The problem we are having is that we also need to delete entries out of that 
list if a connection is going to be removed but we didn't find a proper 
solution to that.
We tried to define a function for ip_conntrack_destroyed but this doesn't seem 
to be called properly because when a UDP connection is removed 
from /proc/net/ip_conntrack the function will not be called. Nevertheless the 
function is called but with, for us, unknown connection IDs and to strange 
times.
This method also doesn't seem to be a good solution because NAT seems to be 
using it and this would mean we would get troubles if our module is running 
while NAT is running too.

We also tried the notifier system of conntrack with registering on it. 
(ip_conntrack_register_notifier(&nb);)
But this doesn't seem to give us the needed information.

Now the question for us is, if we can somehow implement a nice solution for 
this.
Does somebody know of such a solution?

Best regards,
Thomas Mader

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-10-15 17:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 11:59 remove connections notification by conntrack? Thomas Mader
2006-09-22 12:58 ` Pablo Neira Ayuso
2006-09-22 13:19   ` Thomas Mader
2006-09-22 15:00     ` Pablo Neira Ayuso
2006-09-23  9:23       ` Thomas Mader
2006-09-24  3:10         ` Pablo Neira Ayuso
2006-09-24  9:51           ` Thomas Mader
2006-09-24 15:34             ` Pablo Neira Ayuso
2006-10-15 13:01               ` Thomas Mader
2006-10-15 16:11                 ` Pablo Neira Ayuso
2006-10-15 17:03                   ` Thomas Mader
2006-09-25 17:12         ` Alan Ezust

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.