From 49a0c703c104deb4a85308b8482a613d32a4a05b Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Fri, 18 Dec 2020 18:38:44 +0100 Subject: [PATCH] wifiscan.cpp: sanitized mac filter condition --- src/wifiscan.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wifiscan.cpp b/src/wifiscan.cpp index 9e9c480e..edcafe13 100644 --- a/src/wifiscan.cpp +++ b/src/wifiscan.cpp @@ -33,8 +33,9 @@ IRAM_ATTR void wifi_sniffer_packet_handler(void *buff, // process seen MAC #if MACFILTER - // we guess it's a smartphone, if randomization bit of MAC is set - if (!(hdr->addr2[0] & 0b10)) + // we guess it's a smartphone, if U/L bit #2 of MAC is set + // bit #2 = 1 -> local mac (randomized) / bit #2 = 0 -> universal mac + if ((hdr->addr2[0] & 0b10) == 0) return; else #endif