Add types and macros for ICMPv6 filtering - #5225
Conversation
efdab70 to
5d1ba9f
Compare
5d1ba9f to
8bbb220
Compare
|
Sorry for spamming the CI; I couldn't get it to work on my fork. Anyways, I'm mostly confident with this PR. The missing parts are:
Some notes on the implementation:
|
c7dad56 to
24752bd
Compare
This comment has been minimized.
This comment has been minimized.
24752bd to
22c60ff
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
22c60ff to
e258771
Compare
This comment has been minimized.
This comment has been minimized.
e258771 to
316e598
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
316e598 to
62f5951
Compare
This comment has been minimized.
This comment has been minimized.
62f5951 to
8092d0a
Compare
|
I'll tag @tgross35 since he reviewed my previous PR that this is split from. |
8092d0a to
37e6e91
Compare
This comment has been minimized.
This comment has been minimized.
37e6e91 to
1995d3a
Compare
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
This commit adds the icmp6_filter type and the corresponding ICMP6_FILTER macros. These functions are tested in a similar manner to the CMSG macros.
4259f21 to
f5752f3
Compare
|
@madsmtm Does iOS support ICMPv6 filter operations? I'm not sure if I need to mark the definitions or headers MacOS-only for the apple target. |
|
Pinging @tgross35 again; it’s been ~2 months without a review. Making sure this PR hasn’t fallen through the cracks. |
|
iOS supports ICMPv6 filter operations. |
Description
This commit adds the icmp6_filter type and the corresponding ICMP6_FILTER macros.
The API is defined in RFC 2292; I split-off this code from #4954 because the testing code here is more substantial.
These functions are tested in a similar manner to the CMSG macros, as the implementation differs between Linux and BSDs.
Sources
https://github.com/bminor/glibc/blob/04e750e75b73957cf1c791535a3f4319534a52fc/inet/netinet/icmp6.h
https://github.com/kraj/musl/blob/kraj/master/include/netinet/icmp6.h
https://github.com/freebsd/freebsd-src/blob/9ae367d11de8abbdf53884836c9ba30908c5c8db/sys/netinet/icmp6.h
https://github.com/apple-oss-distributions/xnu/blob/main/bsd/netinet/icmp6.h
Also in the RFC: https://datatracker.ietf.org/doc/html/rfc2292#section-3.2
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated