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
60c3e0f72a
commit
4aa5d00e3d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88132
@ -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