|
|
@ -100,10 +100,10 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if config.ReceiveOriginalDestAddress && isUDPSocket(network) {
|
|
|
|
if config.ReceiveOriginalDestAddress && isUDPSocket(network) {
|
|
|
|
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_IPV6, unix.IPV6_RECVORIGDSTADDR, 1); err != nil {
|
|
|
|
err1 := syscall.SetsockoptInt(int(fd), syscall.SOL_IPV6, unix.IPV6_RECVORIGDSTADDR, 1)
|
|
|
|
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_IP, syscall.IP_RECVORIGDSTADDR, 1); err != nil {
|
|
|
|
err2 := syscall.SetsockoptInt(int(fd), syscall.SOL_IP, syscall.IP_RECVORIGDSTADDR, 1)
|
|
|
|
return err
|
|
|
|
if err1 != nil && err2 != nil {
|
|
|
|
}
|
|
|
|
return err1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|