Problem: Zbeacon does not support IPv6 #1616
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solution: see commits
Implement support for IPv6 multicast, using ff02::1 as the default address which provides more or less the equivalent of IPv4 broadcast.
Note the hack in the last commit: due to what I think it's a Linux specific quirk it's not possible to receive v6 multicast if the socket is bound to anything other than inaddr_any, which breaks Zbeacon since the source address will be randomly picked. So I had to use 2 UDP sockets, one for sending and one for receiving.
Tested on Linux with zpinger and zbeacon_tester from zyre between a desktop, a raspberry pi 2 running Debian armv7 and a raspberry pi 3 running Fedora arm64.
Help testing on osx and on more machines with zyre would be very welcome!