wpa_supplicant: Add BTM security checks

This commit is contained in:
Kapil Gupta
2021-12-31 20:15:32 +05:30
committed by BOT
parent bac4173161
commit f6da49c3c9
5 changed files with 49 additions and 21 deletions

View File

@@ -36,6 +36,10 @@ void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec)
wpa_dbg(wpa_s, MSG_DEBUG, "Already scanning - Return");
return;
}
if (!wpa_s->current_bss) {
wpa_dbg(wpa_s, MSG_INFO, "Current BSS is null - Return");
return;
}
params = os_zalloc(sizeof(*params));
if (!params) {

View File

@@ -308,12 +308,15 @@ bool wpa_scan_res_match(struct wpa_supplicant *wpa_s,
return false;
}
/* TODO security Match */
/* Just check for Open/secure mode */
if ((current_bss->caps & WLAN_CAPABILITY_PRIVACY) != (target_bss->caps & WLAN_CAPABILITY_PRIVACY)) {
wpa_printf(MSG_DEBUG, "WNM: Security didn't match");
return false;
}
return true;
}
static struct wpa_bss *
compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs,
enum mbo_transition_reject_reason *reason)