Skip to content

net: use IPPROTO_IPV6 for IPV6_MULTICAST_HOPS - #1662

Open
RajaBabu15 wants to merge 2 commits into
bytecodealliance:mainfrom
RajaBabu15:net-ipv6-multicast-hops
Open

net: use IPPROTO_IPV6 for IPV6_MULTICAST_HOPS#1662
RajaBabu15 wants to merge 2 commits into
bytecodealliance:mainfrom
RajaBabu15:net-ipv6-multicast-hops

Conversation

@RajaBabu15

Copy link
Copy Markdown

IPV6_MULTICAST_HOPS is an IPPROTO_IPV6 option. Both backends were
passing IPPROTO_IP, so get/set either failed with NOPROTOOPT or
didn't actually set the hop limit.

The existing test only read the default and treated NOPROTOOPT/INVAL
as success. Added a UDP set/get round-trip, and OPNOTSUPP on the
stream-socket get (macOS returns that once the level is correct).

Fixes #1660

Both backends were passing IPPROTO_IP. Add a UDP set/get round-trip
so this can't hide behind NOPROTOOPT on a stream socket.

Fixes bytecodealliance#1660
The old assert expected 0 because get used the wrong protocol
level. Linux (and NetBSD) report 1 once the option is queried
correctly, same as IP_MULTICAST_TTL.
@RajaBabu15

Copy link
Copy Markdown
Author

ubuntu-22.04 and the dragonfly job are the existing nightly/tempfile rustix-1.1.4 break and #1648, not this. use-libc jobs are green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong flag used for (set_)ipv6_multicast_hops

1 participant