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

fix mdns crash on scoped IPv6 link-local #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adienakhmad
Copy link

fixes #3

Before this change the library will always crash with SocketException: no route to host when mdns is used on IPv6 interface with a scoped address e.g. [FE80::1%1]

The root cause was because the multicast address for IPv6 didn't specify a scope ID for such cases.

This commit fixes it by first checking if the local endpoint is an IPv6 link local, if true, then it will create and use a scoped multicast address. The resulting multicast address is then stored for reuse.

Before this change the library will always crash with "SocketException: no route to host" when used on IPv6 interface with a scoped address e.g.[FE80::1%1].

The root cause was because the multicast address for IPv6 didn't specify a scope ID for such cases.

This commit fixes it by first checking if the local endpoint is an IPv6 link local, if true, it will create and use a scoped multicast address for mdns. The resulting multicast address is then stored for reuse.
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.

mdns crash on multiple IPv6 link-local
1 participant