Correctly calculate length of IP header.
Submitted by: Eugene Hartmann <eugene tpsb.com.ru>
This commit is contained in:
parent
1d54aa3ba9
commit
e7bf470011
@ -246,7 +246,8 @@ ng_nat_rcvdata(hook_p hook, item_p item )
|
||||
|
||||
if ((ip->ip_off & htons(IP_OFFMASK)) == 0 &&
|
||||
ip->ip_p == IPPROTO_TCP) {
|
||||
struct tcphdr *th = (struct tcphdr *)(ip + 1);
|
||||
struct tcphdr *th = (struct tcphdr *)((caddr_t)ip +
|
||||
(ip->ip_hl << 2));
|
||||
|
||||
/*
|
||||
* Here is our terrible HACK.
|
||||
|
Loading…
x
Reference in New Issue
Block a user