You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In newer versions of Linux, an additional variant IPPROTO_MPTCP has been added: torvalds/linux@faf391c. This caused the value of IPPROTO_MAX to change from IPPROTO_MPLS + 1 = 256 to IPPROTO_MPTCP + 1 = 263
However, the libc crate currently defines IPPROTO_MAX as 256:
This causees libc-test to fail when run against a newer kernel version. I'm not really sure what IPPROTO_MPTCP is used for, but this seemed worth bringing up.
The text was updated successfully, but these errors were encountered:
My just cloned repo (@61e5f91833272d8fa2a2fb6bede3add62218f627) fails libc-test on Ubuntu 20.10/AMD64 (beta) with
Running /home/tommy/projects/Rust/libc/target/debug/deps/main-63261675787c2312
RUNNING ALL TESTS
bad IPPROTO_MAX value at byte 0: rust: 0 (0x0) != c 7 (0x7)
thread 'main' panicked at 'some tests failed', /home/tommy/projects/Rust/libc/target/debug/build/libc-test-e26fe6d8326278e5/out/main.rs:12:21
I think, in the future, we should avoid exposing the placeholder _MAX constants at the ends of enumerations, unless there's a specific compatibility reason we need to do so.
In the meantime, I think we should update the value of this.
In newer versions of Linux, an additional variant
IPPROTO_MPTCP
has been added: torvalds/linux@faf391c. This caused the value ofIPPROTO_MAX
to change fromIPPROTO_MPLS + 1 = 256
toIPPROTO_MPTCP + 1 = 263
However, the
libc
crate currently definesIPPROTO_MAX
as256
:libc/src/unix/linux_like/linux/mod.rs
Line 1319 in 999e5e1
This causees
libc-test
to fail when run against a newer kernel version. I'm not really sure whatIPPROTO_MPTCP
is used for, but this seemed worth bringing up.The text was updated successfully, but these errors were encountered: