Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aix: os.networkInterfaces produces inconsistent output #14119

Closed
gireeshpunathil opened this issue Jul 7, 2017 · 2 comments
Closed

aix: os.networkInterfaces produces inconsistent output #14119

gireeshpunathil opened this issue Jul 7, 2017 · 2 comments
Labels
aix Issues and PRs related to the AIX platform. libuv Issues and PRs related to the libuv dependency or the uv binding. os Issues and PRs related to the os subsystem.

Comments

@gireeshpunathil
Copy link
Member

  • Version: v9.0.0-pre (not a regression though)
  • Platform: AIX
  • Subsystem: os
const os = require('os');
const assert = require('assert');

const ifconfig = os.networkInterfaces;
const baseline = ifconfig();
for (var i=0; i < 100; i++)
  assert.deepStrictEqual(baseline, ifconfig());

produces this error:

assert.js:60
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: { en0: 
   [ { address: 'XXXX',
       netmask: '60.160.15.255',
       family: 'IPv4',
       mac: '00:00:00:00:00:00',
      deepStrictEqual { en0: 
   [ { address: 'XXXX',
       netmask: '16.169.50.64',
       family: 'IPv4',
       mac: '00:00:00:00:00:00',
     
    at Object.<anonymous> (/tmp/gireesh/net.js:9:10)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

basically the netmask (and sometimes the mac value too) keeps changing.

@gireeshpunathil gireeshpunathil added os Issues and PRs related to the os subsystem. aix Issues and PRs related to the AIX platform. labels Jul 7, 2017
@gireeshpunathil gireeshpunathil changed the title aix: from os.networkInterfaces produces inconsistent output aix: os.networkInterfaces produces inconsistent output Jul 7, 2017
@gireeshpunathil
Copy link
Member Author

So here is the obvious reason - it is unimplemented - neither netmask nor mac.

@gireeshpunathil
Copy link
Member Author

the values were essentially garbage, neatly formatted as IP addresses.

@richardlau richardlau added the libuv Issues and PRs related to the libuv dependency or the uv binding. label Jul 7, 2017
gireeshpunathil added a commit to gireeshpunathil/libuv that referenced this issue Jul 8, 2017
uv_interface_addresses API extracts the network interface entries.
In AIX, this was not fully implemented. retrieve the network mask and
the mac addresses.

Fixes: nodejs/node#14119
gireeshpunathil added a commit to gireeshpunathil/libuv that referenced this issue Jul 8, 2017
uv_interface_addresses API extracts the network interface entries.
In AIX, this was not fully implemented. retrieve the network mask and
the mac addresses.

Fixes: nodejs/node#14119
gireeshpunathil added a commit to gireeshpunathil/libuv that referenced this issue Jul 9, 2017
uv_interface_addresses API extracts the network interface entries.
In AIX, this was not fully implemented. retrieve the network mask and
the mac addresses.

Fixes: nodejs/node#14119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aix Issues and PRs related to the AIX platform. libuv Issues and PRs related to the libuv dependency or the uv binding. os Issues and PRs related to the os subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants