-
Notifications
You must be signed in to change notification settings - Fork 666
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
Add ControlMessage::Ipv6MulticastHopLimit #2074
Add ControlMessage::Ipv6MulticastHopLimit #2074
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good but for a few things:
- Why limit it to Linux? libc defines IPV6_HOPLIMIT for several operating systems.
- It needs a CHANGELOG entry.
- Ideally there would be a test, though that can be hard for some cmsg types.
Oh, and most of the CI failures should be fixed if you rebase on master. |
a8df4d3
to
9adc8e2
Compare
Thanks for the feedback @asomers !
Unfortunately, there are still a bunch of CI failures which I think are not related to my patch despite rebasing on latest |
No, I don't have a good suggestion for how to write a test. It isn't always possible for weird network options. But I did fix the CI failures on master, so that should work if you rebase. And I suggest you go ahead and define this on every platform where libc defines IPV6_HOPLIMIT. That looks like haiku, Linux, Android, FreeBSD, DragonflyBSD, macos, and ios. |
9adc8e2
to
e35d4ff
Compare
OK thanks 🙂 I updated the patch to include all the Patch is rebased (and tested after the rebase locally), fingers crossed that it gets through CI this time. |
Yes, the libc crate is the correct place to check. This is what I see, with an up to date checkout:
|
fca4475
to
8d7c5a4
Compare
Ah using I guess I was too slow in resolving the merge conflict - there seem to be new CI issues with a transitive dependency on some runners:
Is the right course of action to bump the MSRV here, or pinning some transitive dependency? |
Yeah, I raised MSRV. And it's fixed now, so you can rebase. |
8d7c5a4
to
9437b27
Compare
Thanks, should be ready now after the rebase 🙂 |
@sgasse there was a merge conflict. |
fa314d2
to
45d0545
Compare
Hm OK during a local rebase, I was not required to resolve anything manually. However seeing that you released version |
8c54f08
to
8aad97b
Compare
@asomers maybe now everything is ready for a merge? 🙂 |
@asomers would you be fine with merging this? It would be really useful for me; right now, I have to include this version with a git tag to be able to use the functionality. I think I resolved all issues that you raised, the changelog is up to date and CI is also happy. |
@sgasse the changelog is out of date again, unfortunately. We really need to switch to recording it in a less merge-conflict-prone way. |
When sending IPv6 packets with `sendmsg`, Linux does not use the hop limit set on the socket. Instead, the hop limit has to be specified for each individual message with ancillary data in a cmsg. This commit adds the enum variant `ControlMessage::Ipv6HopLimit` to specify the limit. The variant is available on the `net` feature flag for Linux, MacOs, FreeBSD, DragonflyBSD, Android, iOS and Haiku.
8aad97b
to
c2297a0
Compare
Ah OK 🙃 I have not tried it out, but maybe there are less merge conflicts if we always had the complete structure ## [Unreleased] - ReleaseDate
### Fixed
### Changed
### Added above the release changes? I would hope that git can then figure out where to place changes even if other releases are done before. But not sure, how do other crates to that? 🤔 Nevertheless, updated the patch. |
When sending IPv6 multicast packets with
sendmsg
, Linux does not use the hop limit set on the socket. Instead, the hop limit has to be specified for each individual message with ancillary data in a cmsg.This commit adds the enum variant
ControlMessage::Ipv6MulticastHopLimit
to specify the limit.