From: Benjamin Berg Date: Tue, 20 Feb 2024 13:18:20 +0000 (+0100) Subject: WNM: Drop check for current_ssid X-Git-Tag: hostap_2_11~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=939cd294b2e091d1aec62d08cab85f9368349ab6;p=thirdparty%2Fhostap.git WNM: Drop check for current_ssid It should never be NULL. In the unlikely event that it is NULL, the logic changes slightly to reject all candidates. Signed-off-by: Benjamin Berg --- diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index a883feabb..924427fe6 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -795,8 +795,7 @@ compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs, continue; } - if (wpa_s->current_ssid && - !wpa_scan_res_match(wpa_s, 0, target, wpa_s->current_ssid, + if (!wpa_scan_res_match(wpa_s, 0, target, wpa_s->current_ssid, 1, 0)) { wpa_printf(MSG_DEBUG, "Candidate BSS " MACSTR " (pref %d) does not match the current network profile",