Fix multicast_ttl_v4 on non-Linux#630
Conversation
|
Even though it succeeds in tokio, which uses essentially the same code internally: Edit: Never mind, that was because the tests default to |
25696e4 to
125f07d
Compare
On MacOS and FreeBSD, `multicast_ttl_v4` fails with:
Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
According to FreeBSD’s ip(4), it is supposed to be u8:
https://man.freebsd.org/cgi/man.cgi?query=ip&apropos=0&sektion=0&manpath=FreeBSD+15.0-RELEASE+and+Ports&arch=default&format=html
Had to expand the test! macro to take SockType, since the multicast options work only over UDP.
Without that, `set_multicast_ttl_v4` would fail even on Linux with:
Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
125f07d to
2a96c82
Compare
|
This claims to change how |
|
Right. I had a theory that the tests were failing on Darwin because of wrong size of the value passed to And it also turned out that tokio’s So I am even more confused why the tests in tokio were failing on Windows and non-Linux UNIXes with the same errors like here initially: |
This is the main difference from tokio, where `UspSocket` can be only constructed by binding to a specific address.
|
If everything (in socket2) works, then what is the plan for this pr? |
|
I can just keep the test if you think it is helpful. Otherwise, it can be closed. |
|
Then I'm going to close this. |
On Windows,
set_multicast_ttl_v4fails with:On MacOS and FreeBSD,
multicast_ttl_v4fails with:According to FreeBSD’s ip(4), it is supposed to be u8:
I do not understand why it fail on Windows, where it should be
DWORD(i.e.u32).