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:
@@ -1684,7 +1684,7 @@ def parse_frame(data: bytes) -> None:
|
|||||||
# labeled personal devices where we trust the frame regardless, because
|
# labeled personal devices where we trust the frame regardless, because
|
||||||
# iPhones with privacy MACs often only emit opcode=2 after initial association.
|
# iPhones with privacy MACs often only emit opcode=2 after initial association.
|
||||||
with personal_lock:
|
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):
|
if opcode == 1 or (opcode == 2 and is_labeled):
|
||||||
_update_last_seen(src_mac)
|
_update_last_seen(src_mac)
|
||||||
# Personal devices first seen via ARP get no DHCP/Netlink event.
|
# Personal devices first seen via ARP get no DHCP/Netlink event.
|
||||||
|
|||||||
Reference in New Issue
Block a user