-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Description
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
- Force ARP resolution for an IP1 (a device in LAN)
- Change IP from IP1 to IP2 on the target device.
- Wait ARP entry timeout (or more)
- execute get_mac_address(ip=IP1), will still get the device MAC (which is now IP2) instead of '00:00:00:00:00:00'.
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):
- OS name: Ubuntu
- OS Version: 20.04.4 LTS focal
- Python version: 3.8.10 x64
Additional context
Running "arp -d 192.168.88.101" solves the issue.
Reactions are currently unavailable