Skip to content

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

Merged
ikatson merged 1 commit intomainfrom
upnp-multicast-multiaddr
Sep 6, 2024
Merged

UPNP: join all multicast groups from all interfaces (not just the default one picked by the kernel)#232
ikatson merged 1 commit intomainfrom
upnp-multicast-multiaddr

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