-
Notifications
You must be signed in to change notification settings - Fork 680
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
feat: add support for DSCP and TTL / Hop Limit #2425
Conversation
* Support IP_RECVTTL and IPV6_RECVHOPLIMIT socket options and related control messages for recvmsg. * Support setting DSCP in control messages for both sendmsg and recvmsg. Signed-off-by: Bigo <[email protected]>
Hi, thanks for the PR! Sorry for the late response!
For the cfg for targets (OSes), see Lines 20 to 27 in 5fde28e
|
Thanks a lot for the review and don't worry about the timing :) I'll address the comments and publish a new version!
|
Co-authored-by: SteveLauC <[email protected]>
The code we have right now does not build on freebsd 14 because
I think we need to enable RECVTTL only on linux. |
On FreeBSD, Update: PR filed rust-lang/libc#3750 Update: PR merged, we can use the libc from git now: libc = { git = "https://github.com/rust-lang/libc", branch = "libc-0.2", features = ["extra_traits"] } |
I am moving this back to draft, while I find some time to finish to implement the changes and fix all the tests. |
HI @crisidev, would you like to finish this? That type thing should be easy to deal with as we know the type used by the OS kernel:) |
Hey, sorry, life got in the middle.. I'd love to finish this, but I am finally on holidays for a couple of weeks. I will be able to restart working on this in the second week of August if that's ok.. |
Yeah, that is totally fine, enjoy you holiday, we all have a life😁 |
I found some time during a lazy Sunday and I am trying to finish this 😄 CI is making my life very hard right now, I'll try to fix it and move this to non draft. |
I think I am done fixing CI issues. I had to disable the tests for IPTOS / IPV6TCLASS on mips since they return bogus values and I don't have a good way to troubleshoot it. |
@SteveLauC first of all, thanks for all the patient comments, I really appreciate the help. I think this is ready for review now! |
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.
Well, sorry for so many comments, I hope they won't affect your holiday:)
Most of them are trivial cfg
issues, so should be easy to fix
Please don't you worry about this. I am quite new to this crate and without your help, I would be able to make a meaningful contribution. At the end, you did most of the work, I am really glad this is moving forward thanks to your help. I'll try to fix everything today, I think it start to look good, apologies for the mess I did with |
I think I could use another review now :) |
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.
Just one little thing, let me commit this change:)
Thanks! |
What does this PR do
This PR improves the support for setting and retrieving of IP headers values for
It includes the socket options and the appropriate control messages for
sendmsg
andrecvmsg
.Note: I am not 100% sure I understand correctly the
cfg
values and feature flags ofnix
, so they could be set wrongly in the PR.Checklist:
CONTRIBUTING.md