Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPNP: join all multicast groups from all interfaces (not just the default one picked by the kernel) #232

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

ikatson
Copy link
Owner

@ikatson ikatson commented Sep 5, 2024

Turns out when (at least) in linux you join a multicast group with ifaddr=INADDR_ANY, it binds it to the "interface picked by the system" rather than all.

Looking at the linux kernel implementation, it's the interface which routes to the interface that points to "ip route get 239.255.255.250". However, this isn't ideal, and here's the setup where it broke: the default LAN isn't the default route, but Wireguard VPN is. So "ip route get 239.255.255.250" points to wireguard tunnel which is useless.

This makes it join multicast groups on all interfaces, starting with the default INADDR_ANY (IpV4Addr::UNSPECIFIED in rust).

@ikatson ikatson merged commit cdd21cb into main Sep 6, 2024
6 checks passed
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.

1 participant