diff options
-rw-r--r-- | lib/libalias/alias.c | 4 | ||||
-rw-r--r-- | sys/netinet/libalias/alias.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/libalias/alias.c b/lib/libalias/alias.c index 154cf4e..320c5c2 100644 --- a/lib/libalias/alias.c +++ b/lib/libalias/alias.c @@ -1058,12 +1058,14 @@ TcpAliasOut(struct ip *pip, int maxpacketsize) u_short *sptr; /* Save original destination address, if this is a proxy packet. - Also modify packet to include destination encoding. */ + Also modify packet to include destination encoding. This may + change the size of IP header. */ if (proxy_type != 0) { SetProxyPort(link, dest_port); SetProxyAddress(link, dest_address); ProxyModify(link, pip, maxpacketsize, proxy_type); + tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); } /* Get alias address and port */ diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c index 154cf4e..320c5c2 100644 --- a/sys/netinet/libalias/alias.c +++ b/sys/netinet/libalias/alias.c @@ -1058,12 +1058,14 @@ TcpAliasOut(struct ip *pip, int maxpacketsize) u_short *sptr; /* Save original destination address, if this is a proxy packet. - Also modify packet to include destination encoding. */ + Also modify packet to include destination encoding. This may + change the size of IP header. */ if (proxy_type != 0) { SetProxyPort(link, dest_port); SetProxyAddress(link, dest_address); ProxyModify(link, pip, maxpacketsize, proxy_type); + tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); } /* Get alias address and port */ |