Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve multicast defaults #222
This PR changes two defaults related to the use of multicast:
I've managed to check the WiFi/wired detection on macOS and Linux (though only with straightforwad network configuration). The code it uses on Windows seems like it ought to be correct, but it would be much appreciated if someone with a Windows box could give it a try.
The other commit is just a slight lenthening of a timeout in a test and the removal of a fixed port number. Those are the only two obvious things that may have caused the intermittent failure of the "select timeout" test (#212).
That should actually be ok: the protocol works by advertising addresses that it is willing to receive data on (for the WiFi ones that would just be unicast) and by selecting the ones it is willing to send data to (for the WiFi ones, gain just unicast). Thus, the network should end up relying only on unicast for communicating with the WiFi ones.
It is a good point, though: by default the multicast address used for data is the same as for discovery. So, the WiFi nodes will get some packets via multicast, and it would be wise to verify that those do not trigger retransmit requests.
The other edge case is if there are nodes that are connected over Ethernet to a WiFi device that integrates into the larger network. That seems rather unusual, and so requiring a configuration file to overrule the default seems reasonable to me.
I did a few more checks:
It looks to me like changing the defaults in this way does constitute an improvement. It doesn't change the need for improvements in the handling of problems, but I think that should be considered another problem.
@k0ekk0ek : are you ok with my changes?
@eboasson, no real comments. Personally, I would've checked for
I would however just skip the first two header lines in the Linux code. I think currently you're only skipping one(?). Would make the
Maybe replace the
Locale dependent stuff is nasty indeed — I'd better change it.
It actually skips the first two lines: first it reads to the newline in state SKIP_HEADER_1, then it skips to the second newline in SKIP_TO_EOL, and only then does it start checking for names. Why Linux doesn't offer an easy way is a mystery to me ...
Perhaps I'll add a comment line :)
I would assume the kernel would list aliases as well, but I too am inclined to ignore that detail. After all, it only affects the default setting.
Might as well do that, too.