getmac icon indicating copy to clipboard operation
getmac copied to clipboard

Incorrect mac address on macbook

Open knapcio opened this issue 4 years ago • 2 comments

Hi,

The library worked fine for me for a while (a week or two) and returned a correct mac address for my macbook. However today (possibly after I restarted my laptop) it started returning ac:de:48:00:11:22 which is, as mentioned in this topic, iBridge adapter address. Lib version: 5.16.0.

Thanks!

knapcio avatar Sep 21 '20 09:09 knapcio

A PR will be needed to address this, as I just don't have time. getmac is purely developed and maintained on a floss gratis basis.

Seems as it was fixed before, maybe the commit history will have some code for it.

balupton avatar Oct 29 '20 02:10 balupton

To elaborate

getmac v4 and higher have just been wrappers around https://nodejs.org/dist/latest-v12.x/docs/api/os.html#os_os_networkinterfaces

you should call that directly and see if it produces the results you need, then we can adapt this wrapper.

if that doesn't product the results you need, then you will need to file a bug report on the node.js issue tracker so they fix what that api returns

balupton avatar Aug 24 '21 03:08 balupton