Fix MAC normalization in ARP opcode=2 trust gate

is_labeled compared raw src_mac against normalized device_labels keys,
always evaluating False for labeled devices. ARP replies (opcode=2) from
personal MACs were never trusted, so on_arrival only fired on ARP
requests (opcode=1) which are rare. Labeled devices now correctly pass
the opcode=2 gate, triggering arrival alerts with their display name.
This commit is contained in:
Cobra
2026-04-15 00:24:59 -04:00
parent c422b7e3f6
commit 3084c76b02
+1 -1
View File
@@ -1684,7 +1684,7 @@ def parse_frame(data: bytes) -> None:
# labeled personal devices where we trust the frame regardless, because
# iPhones with privacy MACs often only emit opcode=2 after initial association.
with personal_lock:
is_labeled = src_mac in device_labels
is_labeled = _normalize_mac(src_mac) in device_labels
if opcode == 1 or (opcode == 2 and is_labeled):
_update_last_seen(src_mac)
# Personal devices first seen via ARP get no DHCP/Netlink event.