Update sockopt_windows.go

This commit is contained in:
RPRX 2025-03-31 12:11:12 +00:00 committed by GitHub
parent 946c480bd4
commit 4b074a06ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,6 +90,7 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig)
}
}
}
if config.V6Only {
if err := syscall.SetsockoptInt(syscall.Handle(fd), syscall.IPPROTO_IPV6, IPV6_V6ONLY, 1); err != nil {
return errors.New("failed to set IPV6_V6ONLY").Base(err)