Skip to content

Add interface argument to Ipv6MembershipRequest::new#2736

Open
Skyb0rg007 wants to merge 1 commit intonix-rust:masterfrom
Skyb0rg007:ipv6-mreq
Open

Add interface argument to Ipv6MembershipRequest::new#2736
Skyb0rg007 wants to merge 1 commit intonix-rust:masterfrom
Skyb0rg007:ipv6-mreq

Conversation

@Skyb0rg007
Copy link

@Skyb0rg007 Skyb0rg007 commented Feb 5, 2026

This commit adds an additional argument to the
Ipv6MembershipRequest::new function that allows the user to specify the interface index for which the
membership request is associated with.

Closes #323

What does this PR do

This PR revives the efforts of #1320 to add proper support to the IPV6_JOIN_GROUP socket option.

Devices (especially routers) have many IPv6 interfaces, and being able to specify which interfaces to join a multicast group on is critical. Specifying 0 (as is currently done) is not portable:

If the interface index is specified as 0, the kernel chooses local interface. For example, some kernels look up multicast group in the normal IPv6 routing table and using the resulting interface.

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

This commit adds an additional argument to the
Ipv6MembershipRequest::new function that allows the
user to specify the interface index for which the
membership request is associated with.

Closes nix-rust#323
@Skyb0rg007
Copy link
Author

I guess this is also a duplicate of #2688, with a slightly different API choice. It would be great if one of these PRs were at least reviewed.

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.

ipv6_mreq does not allow interface to be set

1 participant