You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getAllIPAndMACAddressesInARPCache() returns two items with same value. (one for IPv4, one for link-local IPv6)
While iterating over keys, it encounters the wrong key/value pair first and therefore getIPAddressFromMAC returns the wrong key.
I suggest you either let user decide, which IP format they prefer (IPv6 or IPv4), or check for IP pattern before return (according to documentation, it should return IP in format "192.168.0.1")
The text was updated successfully, but these errors were encountered:
rainmasak
changed the title
getIPAddressFromMAC returns IPv6
getIPAddressFromMAC returns link-local IPv6
Sep 16, 2020
getAllIPAndMACAddressesInARPCache() returns two items with same value. (one for IPv4, one for link-local IPv6)
While iterating over keys, it encounters the wrong key/value pair first and therefore getIPAddressFromMAC returns the wrong key.
I suggest you either let user decide, which IP format they prefer (IPv6 or IPv4), or check for IP pattern before return (according to documentation, it should return IP in format "192.168.0.1")
The text was updated successfully, but these errors were encountered: