public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Trouble with an ip_conntrack_helper
@ 2001-03-13  0:45 Steven Walter
  0 siblings, 0 replies; only message in thread
From: Steven Walter @ 2001-03-13  0:45 UTC (permalink / raw)
  To: rusty; +Cc: linux-kernel

I'm getting some interesting behavior while writing an ip_conntrack
helper module.  The primary problem is if I specify a destination port
for the struct ip_conntrack_helper, my help routine is never called.
If I specify a source port, rather than a destination port, the routine
gets called for the various packets in the desired connection.

The problem with this is that I my routine doesn't start getting called
until a packet in the opposite direction arrives, and all packets before
that are never sent by my module.  This makes sense, as the tuple
specifies a /source/ port, which would only occur on reverse traffic.

Here is the chunk of code I'm using to register my helper.  Is there
something really obvious that I'm missing.  I really appreciate any help
you can give.

static struct ip_conntrack_helper icq;

static int __init init(void) {
        memset(&icq, 0, sizeof(struct ip_conntrack_helper));
        icq.tuple.dst.protonum = IPPROTO_UDP;
        icq.tuple.dst.u.udp.port = __constant_htons(4000);
        icq.mask.dst.protonum = 0xffff;
        icq.mask.dst.u.udp.port = 0xffff;
        icq.help = help;
        printk(KERN_INFO "ip_conntrack_icq: registered\n");
        return ip_conntrack_helper_register(&icq);
}


-- 
-Steven
Never ask a geek why, just nod your head and slowly back away.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-13  0:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-13  0:45 Trouble with an ip_conntrack_helper Steven Walter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox