Add autodetection of MAC address, NTP improvements, oui.txt cleanup #3
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.
This fixes several bugs - the most serious of which is failure to include
the NTP timestamp in the result. Crashes due to invalid input are also
fixed. Usage is simplified so that it most cases, no user input is required.
However, no functionality is lost: prompts and overrides are still available.
Changes include:
block 'rv'.commands.)
Deal with multiple responses.
Note that ntpq/ntpdate can take a while to get a timestamp.
ntpq may timeout, but the script will try to recover using ntpdate.
Manually providing a MAC address and/or timestamp should not be
necessary. Doing so without understanding the RFC is likely to
reduce the uniqueness of the generated address. -i is provided
for advanced users.
The MAC autoselection uses the first interface with an ethernet
address. The address of another interface can be used safely.
However, since the purpose is only to seed a hash to identify
the network, there is no reason to prefer one over another.
The timestamp ensures that a given interface can generate more than
one ULA. The only reason to set it manually is deterministic
debugging.
Closes #2 - Part 1 (MAC case). Part two is not an issue: a broadcast addresses can never be a physical MAC address.