-
Notifications
You must be signed in to change notification settings - Fork 1k
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
implement ifreq for linux #2960
Conversation
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
I'm not sure what the CI error means. It seems to complain about type I did not touch?! |
Okay I checked the source and realized that it's anonymous: https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/include/uapi/linux/if.h#L234-L275 Luckily, we have a prior art on FreeBSD: #2556 |
I can't seem to run the tests locally, at least not in the way that the README describes
should this work? I ran these installs based on the dockerfile: In any case, the implementation now more closely mimics the freebsd one. I added a |
I guess your glibc/OS version is old, openat2.h was introduced in Linux 5.6. For example, the libc-test currently requires Ubuntu 22.04 and its glibc version. |
ok, well not much I can do about that in the short run. I may not have fully understood your suggestion: is there something in the freebsd code that I did not copy (correctly) that would fix the current CI issue? |
Looking at the source, ifru_map is also anonymous, it seems. And about in6_ifreq, it's declared on include/uapi/linux/ipv6.h but the test doesn't include it, you have to add it to |
allright, got CI to pass. Thanks @JohnTitor for your help! |
LGTM, could you make sure these are usable for your use case? (If you already did it, great!) Also, it'd be great if you could squash commits into one as the current commits would be noisy when git-blaming. |
91d57ce
to
7266718
Compare
commits are squashed, and I verified that this works for our use case |
Thanks! @bors r+ |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14 |
defines the
ifreq
struct, for use withioctl
. I used the definition from the manpages