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

Explicitly set IP_MULTICAST_IF to ensure that queries are sent on specified NIC #27

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

Conversation

jaime-sense
Copy link

When using a multihomed environment, the library allows the user to specified a NIC to search for a particular service; however without setting IP_MULTICAST_IF, the OS is free to send the query on an interface of its choosing. This change forces the send to occur on the user specified interface. This change works also when using INADDR_ANY.

@esarver
Copy link

esarver commented Aug 9, 2022

I have tested this on windows and can confirm it works perfectly. I was having this exact issue when running discovery on multiple NICs.

@esarver
Copy link

esarver commented Mar 7, 2024

@dylanmckay is there something holding this PR up? I would be happy to help get it merged. I haven't tested this patch against the latest version, though there doesn't appear to be any conflicts (according to GitHub). The MDNS search doesn't work properly for me without this change.

@esarver
Copy link

esarver commented Mar 7, 2024

I have once again tested these changes against 3.0.0 and it works perfectly (on Windows. I have not tested on Linux yet).

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.

2 participants