-
Notifications
You must be signed in to change notification settings - Fork 653
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
Fix setting sockopt::IpMulticastTtl #2072
Fix setting sockopt::IpMulticastTtl #2072
Conversation
24fd8da
to
a57e556
Compare
Why do you say that? It's documented as being u8 on FreeBSD, at least. |
Oh, I just saw the more detailed description in the issue. Please link the issue in your commit message. And yes, this does seem to be a difference between platforms. This sockopt was added way back in 2015 with the first batch of sockopt macros, in 979faf0 . There wasn't good CI at the time, and no tests for that sockopt, so nobody noticed that it was broken. |
a57e556
to
91ce275
Compare
Thanks for the context! I pushed and opened the PR first when there was no issue but now I included the issue in the commit message. My initial commit also included a new test I rebased on the latest |
@sgasse CI should be automatic. Maybe Cirrus had a hiccup? Try force-push again. |
86e4e77
to
e1b44db
Compare
Alright I guess it was a hiccup in Github itself - the force-push yesterday did not make it through to the PR for 5mins ^^ After the rebase, some more CI jobs pass but some still have this error on mutable reference not used mutable 🤔 And the test I added fails on FreeBSD both with |
There are three reasons why that test is failing for you. The first is that it really should be a |
OK thanks for the thorough explanation 🙏 I will take a look tomorrow and update. |
f880bfa
to
ae410a4
Compare
I took the time now to check it and looks good, your fix solves the problem entirely @asomers and it works with There seems to be some congestion at CirrusCI (the failing test lost connection to the runner), but I will force-push again later and hope that the tests pass then. |
ae410a4
to
507f22e
Compare
507f22e
to
eb56ff3
Compare
@asomers I think this would also be ready for merge. |
eb56ff3
to
76c99cc
Compare
Could you please try rebasing this PR to fix CI and resolve the conflict? |
76c99cc
to
ab7f996
Compare
Sure, updated 🙂 |
Should be ready again @asomers ;) |
I'm afraid there's another conflict, @sgasse . Could you please rebase? |
Ever since the sockopt macro was written in 979faf0 we've been passing the wrong size for u8 and usize sockopts.
On Linux and Android, sockopt::IpMulticastTtl can be set for both IPv4 and IPv6 sockets, but not on FreeBSD.
ab7f996
to
4f57ac3
Compare
Sure, I guess that conflict came from my multicast hops PR. Rebased and pushed again 🙂 |
The socket option
IpMulticastTtl
was implemented withu8
as type howeveri32
seems to be the correct type.