handling the termination of 'expected' connection

Yasuyuki KOZAKAI yasuyuki.kozakai at toshiba.co.jp
Mon Feb 13 14:54:17 CET 2006


Hi,

From: iler_ml at fastmail.fm
Date: Tue, 31 Jan 2006 08:34:03 -0800

> Hello,
> 
> I am making the conntrack module similar to ip_conntrack_ftp.c, 
> but additionally I need to track the termination (or expiry) of
> the 'expected' connection.  Thus I need a callback from 
> 'ip_conntrack_core.c' when the 'expected' connection is terminated 
> or expired. I think I need to patch 'ip_conntrack_core.c' for that ? 
> 
> Which points in 'ip_conntrack_core.c' are the right points to hook
> for such event ? 
>
> I though I would patch 'ip_conntrack_core.c' to call my callback when
> struct ip_conntrack_core.c is deallocated. Does this sound right ?

expectation_timed_out() is called when expectation timer is expired.

But it's too hard to take care of the case that expectations are destroyed
by other reason. ip_conntrack_expect_put() might be called with holding lock.

Ideally, caller of ip_conntrack_expect_put() should not hold it...

-- Yasuyuki Kozakai



More information about the netfilter-devel mailing list