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 Linux constants: rtm_protocol and routing message attributes #2996
Conversation
r? @JohnTitor (rust-highfive has picked a reviewer for you, use r? to override) |
Could you also tweak files on https://github.com/rust-lang/libc/tree/master/libc-test/semver? |
@JohnTitor Thanks! I tweaked relevant semver files. |
I guess you probably also need a squash:) |
6d5d8c1
to
d86893d
Compare
@SteveLauC I squashed everything into single commit. |
Thanks for adding those constants to libc. I wanted myself to add some but I was a bit intimidated by the libc project (I'm completely new to Rust and don't understand much of it yet...). They are required for working with the linux routing policy database (equivalent of ip rule command). Then I can add some structures to allow neli to edit the ip rules. thx |
Let's go ahead, for now. We could add more items anytime. |
Add Linux constants: rtm_protocol and routing message attributes Some of these constants are seen in Netlink messages. This is prerequisite to fix [neli](https://github.com/jbaublitz/neli) to also properly decode the values.
💔 Test failed - checks-actions |
I'm not sure what's failing and why. Two cases are both Musl, but what's happening? I tried running the CI tests locally ( |
I'm not sure why it didn't reproduce on your end but I guess it's a culprit that our kernel header version using on MUSL CI is old (4.19.88): Line 82 in cea201b
For instance, I think it's okay to skip tests for them on musl until we support musl 1.2 and test items on more recent kernel versions. |
414a9b8
to
cc1e674
Compare
@JohnTitor Sorry for the delay! I shuffled some tests around and now everything seems to pass. |
@bors r+ |
Add Linux constants: rtm_protocol and routing message attributes Some of these constants are seen in Netlink messages. This is prerequisite to fix [neli](https://github.com/jbaublitz/neli) to also properly decode the values.
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #3148) made this pull request unmergeable. Please resolve the merge conflicts. |
…rom Linux For rtm_protocol definitions the Linux header file (include/uapi/linux/rtnetlink.h) has comment: Values of protocol >= RTPROT_STATIC are not interpreted by kernel; they are just passed from user and back as is. It will be used by hypothetical multiple routing daemons. Note that protocol values should be standardized in order to avoid conflicts. This commit is based on values from https://github.com/torvalds/linux/blob/f0c4d9fc9cc9462659728d168387191387e903cc/include/uapi/linux/rtnetlink.h#L274-L307 and https://github.com/torvalds/linux/blob/f0c4d9fc9cc9462659728d168387191387e903cc/include/uapi/linux/rtnetlink.h#L358-L393
Sorry, missed the last force push (seems I didn't get the notification for that), @bors r+ |
Add Linux constants: rtm_protocol and routing message attributes Some of these constants are seen in Netlink messages. This is prerequisite to fix [neli](https://github.com/jbaublitz/neli) to also properly decode the values.
💔 Test failed - checks-actions |
Failed on musl:
Could you tweak the test to ignore these consts on musl? |
Closing as inactive, feel free to resolve the above comment and re-submit a PR if you're still interested in this change. Thanks for your contribution anyway! |
Some of these constants are seen in Netlink messages. This is prerequisite to fix neli to also properly decode the values.