how to program a conntrack module

Svenning Sørensen
Sat, 27 Oct 2001 03:35:22 +0200

I wrote:

> Your pointer arithmetic works in units of struct iphdr.
> You should cast the iph pointer to a char pointer first, like this:
>  struct tcphdr *th = (struct tcphdr *)(char *)iph+iph->ihl*4;

Argh! I blew it myself... Blush! It should read:

  struct tcphdr *th = (struct tcphdr *)((char *)iph+iph->ihl*4);