34549e0e98
Add missing IPV6_TRANSPARENT socket option to the TCP redirect listener Control callback, matching what the UDP redirect listener already sets. Without this, the kernel silently drops IPv6 TPROXY-redirected connections. Also clean up handler_linux.go getOriginalDstAddr: - Remove encoding/binary import and heap allocation for port conversion - Replace with zero-allocation ntohs (native-to-network byte order swap) - Document the struct layout hack where GetsockoptIPv6Mreq and GetsockoptIPv6MTUInfo are used to read sockaddr_in/sockaddr_in6 from SO_ORIGINAL_DST (kernel returns smaller structs than the getter functions expect, but only the first N bytes are populated) Fixes go-gost/gost#126