[strace/strace] Should IPPROTO_MAX be updated? (#164)
Kevin Daudt
notifications at github.com
Mon Nov 23 20:09:19 UTC 2020
The latest version of musl updated `IPPROTO_MAX` in `/usr/include/netinet/in.h` to '263' after the addition of `IPPROTO_MPTCP`, which has a value of '262'.
Strace also [added IPPROTO_MPTCP](2c721018cc3351ee4518f4f57bbf5b646f96d533), but `IPPROTO_MAX` was not updated. This causes an assert to fail on Alpine Linux:
```
xlat/inet_protocols.h:242:1: error: static assertion failed: "IPPROTO_MAX != 256"
242 | static_assert((IPPROTO_MAX) == (256), "IPPROTO_MAX != 256");
```
The question is, does it make sense to update `IPPROTO_MAX`, like musl did or not. If it makes sense, but strace has not updated it due to compatibility with glibc, I can patch the strace definition on Alpine Linux for the time being to match. But if there is a good reason not to update it, musl will probably revert that change.
One hint I found in the [Linux source](https://github.com/torvalds/linux/blob/master/tools/include/uapi/linux/in.h#L83). There `IPPROTO_MAX` is defined after `IPPROTO_MPTCP` in the enum, indicating the value equals to '263'.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/strace/strace/issues/164
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20201123/73f2e73a/attachment.htm>
More information about the Strace-devel
mailing list