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

Don't Returns Mac's #65

Closed
frank-dspeed opened this issue Aug 21, 2017 · 12 comments
Closed

Don't Returns Mac's #65

frank-dspeed opened this issue Aug 21, 2017 · 12 comments
Labels

Comments

@frank-dspeed
Copy link

node 8.4
Ubuntu 17.10

  { iface: 'wlx803f5d20b751',
    ip4: '192.168.0.17',
    ip6: '',
    mac: '00:00:00:00:00:00',
    internal: false },
  { iface: 'docker0',
    ip4: '172.17.0.1',
    ip6: '',
    mac: '00:00:00:00:00:00',
    internal: false },
  { iface: 'br-79bf4b77c82a',
    ip4: '172.19.0.1',
    ip6: '',
    mac: '00:00:00:00:00:00',
    internal: false } ]

@sebhildebrandt
Copy link
Owner

sebhildebrandt commented Aug 22, 2017

Hi,

does os.networkInterfaces() returns mac addresses (node internal function)? Can you post the output?

@sebhildebrandt
Copy link
Owner

Seems to be an node issue, with node 7.x I got correct mac addresses, node 8.4 does not return correct mac addresses. See nodejs/node#13581

@sebhildebrandt
Copy link
Owner

There is already a pull request in the node repo, that should fix this issue.

@frank-dspeed
Copy link
Author

frank-dspeed commented Aug 22, 2017

@sebhildebrandt
os does return correct.

13: vetha0a97ab@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default 
    link/ether 1e:4e:f6:04:7f:f8 brd ff:ff:ff:ff:ff:ff link-netnsid 0
15: veth152eff9@if14: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default 
    link/ether 7e:98:f7:46:ff:e9 brd ff:ff:ff:ff:ff:ff link-netnsid 1
17: veth628819b@if16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-79bf4b77c82a state UP group default 
    link/ether be:ea:22:08:05:2e brd ff:ff:ff:ff:ff:ff link-netnsid 3

@sebhildebrandt
Copy link
Owner

Yes, os returns it correct but the node built-in function os.networkInterfaces() has an issue (which has already a pull request). As soon as this gets into the node core, System Information will again return correct values. Hope that is fine for you.

@ItsEcholot
Copy link

You could circumvent this issue temporarily till the node bug gets resolved by downgrading to Node v7 as, like @sebhildebrandt mentioned, the mac address detection works like a charm there.

@sebhildebrandt
Copy link
Owner

Anyway, I hope the node team will merge the pull request on their side soon ;-)

@XadillaX
Copy link

XadillaX commented Sep 7, 2017

nodejs/node@8485a7c

I think you may close this issue now.

@frank-dspeed
Copy link
Author

I only wanted to report that i don't have any problems i droped this package already in favor of my own class that calls os and does exec

@XadillaX
Copy link

XadillaX commented Sep 7, 2017

@sebhildebrandt Maybe you can use https://github.com/node-modules/address as your dependency to get MAC address. Because it has a fallback solution to get the right MAC address during the wrong versions of Node.js.

@sebhildebrandt
Copy link
Owner

sebhildebrandt commented Sep 7, 2017

@XadillaX: I guess you are right, waiting for the pull request on node.js side will anyway not fix the problem that with some node.js you will have wrong MAC addresses. As I want to keep this library dependency free, I will implement a fallback code to get correct MAC versions. I will try to do it next week. And btw. thank you for your comments/suggestions!

@sebhildebrandt
Copy link
Owner

Just published a fix for that ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants