how to program a conntrack module

S. Shore
Fri, 26 Oct 2001 07:57:58 -0500 (CDT)

On Fri, 26 Oct 2001, Fai Yip wrote:
> tcphelp.tuple.dst.protonum = IPPROTO_TCP;
> tcphelp.tuple.dst.u.tcp.port = htons(80);
> tcphelp.mask.dst.protonum = 0xFFFF;
> tcphelp.mask.dst.u.tcp.port = 0xFFFF;
> = tcp_help;
> Did Ií@miss anything which is needed to trigger the tcp_help function????

This confused me quite a bit too. Change it to this:

tcphelp.tuple.dst.protonum = IPPROTO_TCP;
tcphelp.tuple.src.u.tcp.port = htons(80);
tcphelp.mask.dst.protonum = 0xFFFF;
tcphelp.mask.src.u.tcp.port = 0xFFFF; = tcp_help;

.. and it will work. I don't know why it's like this either. Perhaps
someone can explain why setting the src tcp port in the tuple would be
necessary for matching packets with that destination.

Scottie Shore <>
 "Experience is that marvelous thing that enables you to recognize
  a mistake when you make it again." -- F. P. Jones