]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Don't scan frequencies of neighbors that should be ignored
authorBenjamin Berg <benjamin.berg@intel.com>
Tue, 20 Feb 2024 13:18:17 +0000 (14:18 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 2 Mar 2024 18:52:17 +0000 (20:52 +0200)
It does not make sense to scan for neighbors that we are not supposed to
use anyway. As such, skip them.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
wpa_supplicant/wnm_sta.c

index 9cec9e4511cb53609dc9d59476dfdeaec40846c9..652c6d0e7f5b5cffb6c881f1076e174e88b2f96d 100644 (file)
@@ -1358,6 +1358,10 @@ static void wnm_set_scan_freqs(struct wpa_supplicant *wpa_s)
                struct neighbor_report *nei;
 
                nei = &wpa_s->wnm_neighbor_report_elements[i];
+
+               if (nei->preference_present && nei->preference == 0)
+                       continue;
+
                if (nei->freq <= 0) {
                        wpa_printf(MSG_DEBUG,
                                   "WNM: Unknown neighbor operating frequency for "