Track clients communicating with known APs instead of just the target AP

This commit is contained in:
Yaro Kasear 2025-05-02 09:16:49 -05:00
parent 89c210bc9c
commit 95c7225628

View file

@ -128,13 +128,13 @@ def handle_packet(pkt):
if mac not in aps: if mac not in aps:
unlinked_candidates.add(mac) unlinked_candidates.add(mac)
# Track clients talking to the same AP we're connected to # Track clients talking to any known AP
if target_ap_bssid: if a1 and a2:
if a1 and a2: for bssid in aps:
if target_ap_bssid in (a1, a2): if bssid in (a1, a2):
peer = a2 if a1 == target_ap_bssid else a1 peer = a2 if bssid == a1 else a1
if is_unicast(peer) and peer not in aps: if is_unicast(peer):
ap_clients[target_ap_bssid][peer] += 1 ap_clients[bssid][peer] += 1
# === Signal strength tracking === # === Signal strength tracking ===
try: try: