lkml.org 
[lkml]   [2001]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectTrouble with an ip_conntrack_helper
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.034 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site