Development
This commit is contained in:
parent
9989b835e9
commit
2a8f3bc7cc
1 changed files with 1 additions and 1 deletions
|
|
@ -583,7 +583,7 @@ def refresh_arp_cache(cfg):
|
||||||
idx = parts.index('lladdr')
|
idx = parts.index('lladdr')
|
||||||
mac = parts[idx + 1].lower()
|
mac = parts[idx + 1].lower()
|
||||||
if mac not in best or used_secs < best[mac][0]:
|
if mac not in best or used_secs < best[mac][0]:
|
||||||
best[mac] = (used_secs, {'ip': parts[0], 'state': state})
|
best[mac] = (used_secs, {'ip': parts[0], 'state': 'REACHABLE'})
|
||||||
ARP_CACHE_FILE.write_text(json.dumps({m: e for m, (_, e) in best.items()}))
|
ARP_CACHE_FILE.write_text(json.dumps({m: e for m, (_, e) in best.items()}))
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
print(f"WARNING: Could not refresh ARP cache: {exc}")
|
print(f"WARNING: Could not refresh ARP cache: {exc}")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue