hotfix(pmtud/tcp): fix code for IPv6 destinations

This commit is contained in:
Quentin McGaw
2026-02-20 16:23:40 +00:00
parent 73b3e2c88a
commit c66d8bed00
8 changed files with 21 additions and 39 deletions
-5
View File
@@ -1,5 +0,0 @@
package ip
func SetIPv6HeaderIncluded(fd int) error {
panic("darwin does not allow an application to build IPv6 headers")
}
-7
View File
@@ -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)
}
-7
View File
@@ -1,7 +0,0 @@
//go:build !linux && !windows && !darwin
package ip
func SetIPv6HeaderIncluded(fd int) error {
panic("not implemented")
}
-7
View File
@@ -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")
}
+1 -1
View File
@@ -29,7 +29,7 @@ func makeSockAddr(ip netip.Addr, port uint16) unix.Sockaddr {
}
}
return &unix.SockaddrInet6{
Port: int(port),
Port: 0,
Addr: ip.As16(),
}
}