-
Notifications
You must be signed in to change notification settings - Fork 18k
net: ListenMulticastUDP setsockopt: not supported by windows #63529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
(CC @golang/windows) |
Looks like
go/src/syscall/syscall_windows.go Lines 1174 to 1175 in 883f062
|
Well I decided to just copy what func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) {
return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq)))
}
func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) {
return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq)))
} It appears to have worked .\udp.exe
Listening on VirtualBox Host-Only Network
Listening on Ethernet
Skipping interface Wi-Fi
Listening on vEthernet (Default Switch)
Listening on vEthernet (WSL) tbh I don't known why it is marked as not supported. |
Also wondering why the test here didn't catch this https://github.com/golang/go/blob/go1.21.3/src/net/listen_test.go#L603 |
Related #7174 |
Because Lines 613 to 615 in 883f062
|
@mauri870 is your patch working? |
@bt90 I just tried to run the example OP provided, it seemed to enumerate the interfaces correctly, I'm not sure about the actual state of IPv6 on windows |
Change https://go.dev/cl/668216 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Example output on a Linux host:
What did you see instead?
This fails for regular interfaces on Windows 10 and Windows 11 hosts:
The text was updated successfully, but these errors were encountered: