-
Notifications
You must be signed in to change notification settings - Fork 25
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
get_mac_address() is caching an old mac address, no longer present in local ARP #76
Comments
Also tested in |
Hmm, by default on Ubuntu getmac will just read the ARP entries from Also, I should note that getmac avoids shelling out to |
You are right, both entries in /proc/net/arp... Also arpreq is returning the same
|
Looks like flags need to be parsed (?) 0x0 incomplete |
Thanks for investigating and the additional information. It's definitely a bug, and one that should be relatively easy to fix. I'll add a check that the flag != 0x0, which should do the trick, unless there's an edge case that it misses. Since the refactor for 0.9.0 is nearing completion, I'll just implement it in that branch and include the fix in the 0.9.0 release. |
Punting this to 1.0.0 release |
Describe the bug
get_mac_address() is caching an old mac address for a given IP, even when it has timeout from OS ARP table.
Only an explicit delete of the ARP entry on the OS make it return '00:00:00:00:00:00' again.
To Reproduce
OS ARP for IP1:
$ arp 192.168.88.101 -v
Address HWtype HWaddress Flags Mask Iface
192.168.88.101 (incomplete) wlp3s0
Entries: 20 Skipped: 19 Found: 1
Expected behavior
Expects '00:00:00:00:00:00'
System info
(please complete the following information):
Additional context
Running "arp -d 192.168.88.101" solves the issue.
The text was updated successfully, but these errors were encountered: