Hello freebsd-hackers, FreeBSD 4.3 RELEASE.
I tried to use natd transparent proxing ability with encode_ip_hdr type. I found strange behaviour in function TcpAliasOut() (/usr/src/lib/libalias/alias.c). When packet modified by ProxyModify() (/usr/src/lib/libalias/alias_proxy.c), code doesn't recompute pointer to TCP header by calling tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); /usr/src/lib/libalias/alias.c line 1024 ---------------begins here------------------------------------ /* Save original destination address, if this is a proxy packet. Also modify packet to include destination encoding. */ if (proxy_type != 0) { SetProxyPort(link, dest_port); SetProxyAddress(link, dest_address); ProxyModify(link, pip, maxpacketsize, proxy_type); } /* Get alias address and port */ alias_port = GetAliasPort(link); alias_address = GetAliasAddress(link); -----------------ends here------------------------------------- should be ---------------begins here------------------------------------ /* Save original destination address, if this is a proxy packet. Also modify packet to include destination encoding. */ if (proxy_type != 0) { SetProxyPort(link, dest_port); SetProxyAddress(link, dest_address); ProxyModify(link, pip, maxpacketsize, proxy_type); /* Modify pointer to TCP Header, because it can be shifted by ProxyModify() */ tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); } /* Get alias address and port */ alias_port = GetAliasPort(link); alias_address = GetAliasAddress(link); -----------------ends here------------------------------------- Is it a bug or feature? :) -- Best regards, Stepachev Andrey mailto:[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message