mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-09 20:29:23 +02:00
hotfix(pmtud/tcp): fix code for IPv6 destinations
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
package ip
|
||||
|
||||
func SetIPv6HeaderIncluded(fd int) error {
|
||||
panic("darwin does not allow an application to build IPv6 headers")
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package ip
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
func SetIPv6HeaderIncluded(fd int) error {
|
||||
return unix.SetsockoptInt(fd, unix.IPPROTO_IPV6, unix.IPV6_HDRINCL, 1)
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
//go:build !linux && !windows && !darwin
|
||||
|
||||
package ip
|
||||
|
||||
func SetIPv6HeaderIncluded(fd int) error {
|
||||
panic("not implemented")
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package ip
|
||||
|
||||
import "golang.org/x/sys/windows"
|
||||
|
||||
func SetIPv6HeaderIncluded(fd windows.Handle) error {
|
||||
panic("windows does not allow an application to build IPv6 headers")
|
||||
}
|
||||
@@ -29,7 +29,7 @@ func makeSockAddr(ip netip.Addr, port uint16) unix.Sockaddr {
|
||||
}
|
||||
}
|
||||
return &unix.SockaddrInet6{
|
||||
Port: int(port),
|
||||
Port: 0,
|
||||
Addr: ip.As16(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user