Optimize AP-client matching loop
This commit is contained in:
parent
231ce7e8b0
commit
66496e1518
1 changed files with 4 additions and 6 deletions
10
listener.py
10
listener.py
|
@ -140,12 +140,10 @@ def handle_packet(pkt):
|
|||
ap_clients[da][sa] += 5
|
||||
|
||||
# Track clients talking to any known AP
|
||||
if a1 and a2:
|
||||
for bssid in aps:
|
||||
if bssid in (a1, a2):
|
||||
peer = a2 if bssid == a1 else a1
|
||||
if is_unicast(peer):
|
||||
ap_clients[bssid][peer] += 1
|
||||
if a1 in aps and is_unicast(a2):
|
||||
ap_clients[a1][a2] += 1
|
||||
elif a2 in aps and is_unicast(a1):
|
||||
ap_clients[a2][a1] += 1
|
||||
|
||||
# === Signal strength tracking ===
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue