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 <benjamin.berg@intel.com>
This commit is contained in:
Benjamin Berg 2024-02-20 14:18:20 +01:00 committed by Jouni Malinen
parent 436f07d02b
commit 939cd294b2

View file

@ -795,8 +795,7 @@ compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs,
continue; continue;
} }
if (wpa_s->current_ssid && if (!wpa_scan_res_match(wpa_s, 0, target, wpa_s->current_ssid,
!wpa_scan_res_match(wpa_s, 0, target, wpa_s->current_ssid,
1, 0)) { 1, 0)) {
wpa_printf(MSG_DEBUG, "Candidate BSS " MACSTR wpa_printf(MSG_DEBUG, "Candidate BSS " MACSTR
" (pref %d) does not match the current network profile", " (pref %d) does not match the current network profile",