Fixed the bug in transparent TCP proxying with the "encode_ip_hdr"
option -- TcpAliasOut() did not catch the IP header length change. Submitted by: Stepachev Andrey <aka50@mail.ru>
This commit is contained in:
parent
54c092ee14
commit
642a135b45
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user