All of lore.kernel.org
 help / color / mirror / Atom feed
* connection destruction question
@ 2004-03-11  0:51 Kristen Carlson
  2004-03-11  8:13 ` Emmanuel Guiton
  2004-03-19 15:34 ` Unit Zero
  0 siblings, 2 replies; 7+ messages in thread
From: Kristen Carlson @ 2004-03-11  0:51 UTC (permalink / raw)
  To: netfilter-devel

Hello,
Is there a way to be notified in a kernel module 
when a connection is destroyed?  I have a nice helper
module that would like to know when connections are destroyed
so it can do some internal cleanup work. 
Thanks,
Kristen

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <no.id>]
* RE: connection destruction question
@ 2004-03-19 18:04 Accardi, Kristen C
  0 siblings, 0 replies; 7+ messages in thread
From: Accardi, Kristen C @ 2004-03-19 18:04 UTC (permalink / raw)
  To: Unit Zero, Kristen Carlson; +Cc: netfilter-devel

Thank you, that does interest me.  It does seem to match my needs more
closely than the other patch. I also have realized that my approach of
making a helper module to be notified when connections were created
wasn't going to work since I realized it would only be called on the
master connection and not on any of the related connections, and I need
to see state changes for all connections.  I will take a look at the
patch and see if it works out.

By the way, what are your plans for this patch?  I always hate the idea
of using a patch I actually have to maintain myself :), although of
course I will do that if that's what it takes to get my job done.

Kristen



-----Original Message-----
From: netfilter-devel-admin@lists.netfilter.org
[mailto:netfilter-devel-admin@lists.netfilter.org] On Behalf Of Unit
Zero
Sent: Friday, March 19, 2004 7:34 AM
To: Kristen Carlson
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: connection destruction question




On Wed, 10 Mar 2004, Kristen Carlson wrote:

> Hello,
> Is there a way to be notified in a kernel module 
> when a connection is destroyed?  I have a nice helper
> module that would like to know when connections are destroyed
> so it can do some internal cleanup work. 
> Thanks,
> Kristen
> 

Actually I ran into the exact same issue not long ago with a module I've

been working on. My solution was to add a couple lines here and there in

conntrack_core.c and ip_conntrack.h to implement a notifier chain and 
export register/unregister routines from the ip_conntrack module,
allowing 
other modules to add callback functions to the chain. The notifier chain

is then called from various parts of the conntrack_core code with an 
event-code and a struct ip_conntrack ptr reference when conntracks are 
created, destroyed (either explicitly or by timeout), become confirmed, 
or become replied.

I've got a small patch that I put together about a month ago which has 
my modifications described above. I'm pretty sure it will apply cleanly 
to a 2.4.24-25 kernel source tree, but if not the modifications are
pretty 
straight forward. Just thought it might be of interest.

- V. M. Condino

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

end of thread, other threads:[~2004-03-19 18:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-11  0:51 connection destruction question Kristen Carlson
2004-03-11  8:13 ` Emmanuel Guiton
2004-03-19 15:34 ` Unit Zero
     [not found] <no.id>
2004-03-11 21:55 ` Kristen Carlson
2004-03-12  7:10   ` Henrik Nordstrom
2004-03-12 12:58   ` Emmanuel Guiton
  -- strict thread matches above, loose matches on Subject: below --
2004-03-19 18:04 Accardi, Kristen C

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.