Skip to content
Snippets Groups Projects
Commit 0344410c authored by Michael Gernoth's avatar Michael Gernoth
Browse files

Fix "protocol not available" for IPv6 connections

parent cd9f1fb6
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@ func DialUpstreamControl(sport int) func(string, string, syscall.RawConn) error
}
if network == "tcp6" || network == "udp6" {
syscallErr = syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IP, syscall.IPV6_V6ONLY, 0)
syscallErr = syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, 0)
if syscallErr != nil {
syscallErr = fmt.Errorf("setsockopt(IPPROTO_IP, IPV6_ONLY, 0): %s", syscallErr.Error())
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment