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

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

@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.

@xtqqczze

This comment was marked as resolved.

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
RajaBabu15 force-pushed the net-ipv6-multicast-hops branch from a98a0b6 to ab40995 Compare September 19, 2026 14:14
@RajaBabu15

Copy link
Copy Markdown
Author

@xtqqczze i have rebased to main origin

@RajaBabu15

Copy link
Copy Markdown
Author

@xtqqczze i can pick some issue or feature here or somewhere if you have them, ;>

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

2 participants