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

Problem: Windows only sends on one interfaces with INADDR_BROADCAST set (interface option "*") #1644

Merged
merged 1 commit into from
Mar 20, 2017
Merged

Problem: Windows only sends on one interfaces with INADDR_BROADCAST set (interface option "*") #1644

merged 1 commit into from
Mar 20, 2017

Conversation

andycbriggs
Copy link
Contributor

Sending to INADDR_BROADCAST on Windows only results in a single packet being sent over the interface with the highest metric.

This results in nodes not being seen on all interfaces when using the any ("*") interface, metric can be observed using the command 'route print'

Solution: SIO_GET_INTERFACE_LIST offers a cheap way of enumerating interfaces available to a specific socket so a packet can be sent per interface. Profiling shows this method at 0.006ms per invokation against 0.5ms for GetIpAddrTable meaning that this can be used on every beacon send instead of caching the results.

…gle packet being sent over the interface with the highest metric.

This results in nodes not being seen on all interfaces when using the any ("*") interface, metric can be observed using the command 'route print'

Solution: SIO_GET_INTERFACE_LIST offers a cheap way of enumerating interfaces available to a specific socket so a packet can be sent per interface. Profiling shows this method at 0.006ms per invokation against 0.5ms for GetIpAddrTable meaning that this can be used on every beacon send instead of caching the results.
@bluca bluca merged commit fe3a124 into zeromq:master Mar 20, 2017
@bluca
Copy link
Member

bluca commented Mar 20, 2017

Thanks!

If you have the time, would be great to get the IPv6 version working for Windows :-)

@andycbriggs andycbriggs deleted the win_udp_broadcast branch March 21, 2017 10:55
@andycbriggs
Copy link
Contributor Author

I'll look into it, and thanks for cleaning up the commit.

@bluca
Copy link
Member

bluca commented Mar 21, 2017

No worries!

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.

3 participants