NetworkManager should use correct field offset on SunOS and friends #23
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.
♻️ Current situation
See #21, but basically the field offset in the
arp
command output on SunOS-like systems does not match 100% with OpenBSD systems, resulting inNetworkManager.getOpenBSD_SUNOS_NetworkInterfaces()
not returning any interfaces on SunOS-like systems. Making CIAO kind of useless.💡 Proposed solution
Overall the code in
NetworkManager.getOpenBSD_SUNOS_NetworkInterfaces()
looks good, it just needs a different field offset between OpenBSD and SunOS.When
os.platform()
returns sunos (which it does on Oracle Solaris and illumos distros (OpenSolaris continuation)), we simple use a different offset. The default is left as 2 which was the old value.⚙️ Release Notes
CIAO now works properly on SunOS-like systems and will be able to listen on an interface that is not lo0.
➕ Additional Information
n/a
Testing
Made sure I could run
npm run test
and that the tests still passI also switched my nrchkb node-red setup over to the CIAO backend instead of older bonjour backend. (Wanting to switch is what made me discover CIAO was broken)
I've been running said setup for about a month now with CIAO and the change in this PR.
Reviewer Nudging
Not sure, it's a simple offset change, the original issue I filed lists the output of the execute arp command for an illumos based distro and from Oracle Solaris.