Skip to content

Conversation

veedo
Copy link
Contributor

@veedo veedo commented Aug 18, 2021

Summary of changes

Kernels react differently to adding mcast membership to the "0.0.0.0" address depending on how interfaces are set up and how the kernel is configured.
In some situations, on Linux, the socket won't even receive Any traffic.
There's no perfect way to solve this, but it makes more sense to add the multicast membership to the same interface address being used by the underlying socket. The other option is to allow the user to supply all the interface IPs to listen on or force them to use setsockopts through a function.

This feels like it could break some use cases, but using if_addr doesn't work, since binding and membership can be incompatible in Linux. Using bind_to_interface may be a better move, but that is a pretty big interface change.
I'd be happy to change it to do that, if it's acceptable.

Checklist

  • [ N/A] New functions have typespecs, changed functions were updated
  • [ N/A] Same for documentation, including moduledocs
  • [ N/A] Tests were added or updated to cover changes
  • [ ✓] Commits were squashed into a single coherent commit
  • [ ✓] Notes added to CHANGELOG file which describe changes at a high-level

@bitwalker bitwalker merged commit 2711656 into bitwalker:master Jan 18, 2022
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