Use helper functions to access RSNE/RSNXE from BSS entries
This is a step towards allowing the contents of RSNE/RSNXE to be overridden. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
341bcb2b5c
commit
5488e120d3
14 changed files with 63 additions and 40 deletions
|
@ -1866,3 +1866,19 @@ out:
|
||||||
wpabuf_free(mlbuf);
|
wpabuf_free(mlbuf);
|
||||||
return removed_links;
|
return removed_links;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const u8 * wpa_bss_get_rsne(struct wpa_supplicant *wpa_s,
|
||||||
|
const struct wpa_bss *bss, struct wpa_ssid *ssid,
|
||||||
|
bool mlo)
|
||||||
|
{
|
||||||
|
return wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const u8 * wpa_bss_get_rsnxe(struct wpa_supplicant *wpa_s,
|
||||||
|
const struct wpa_bss *bss, struct wpa_ssid *ssid,
|
||||||
|
bool mlo)
|
||||||
|
{
|
||||||
|
return wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
||||||
|
}
|
||||||
|
|
|
@ -226,4 +226,11 @@ int wpa_bss_parse_basic_ml_element(struct wpa_supplicant *wpa_s,
|
||||||
u16 wpa_bss_parse_reconf_ml_element(struct wpa_supplicant *wpa_s,
|
u16 wpa_bss_parse_reconf_ml_element(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_bss *bss);
|
struct wpa_bss *bss);
|
||||||
|
|
||||||
|
const u8 * wpa_bss_get_rsne(struct wpa_supplicant *wpa_s,
|
||||||
|
const struct wpa_bss *bss, struct wpa_ssid *ssid,
|
||||||
|
bool mlo);
|
||||||
|
const u8 * wpa_bss_get_rsnxe(struct wpa_supplicant *wpa_s,
|
||||||
|
const struct wpa_bss *bss, struct wpa_ssid *ssid,
|
||||||
|
bool mlo);
|
||||||
|
|
||||||
#endif /* BSS_H */
|
#endif /* BSS_H */
|
||||||
|
|
|
@ -3119,12 +3119,12 @@ static int wpa_supplicant_ctrl_iface_scan_result(
|
||||||
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
||||||
if (ie)
|
if (ie)
|
||||||
pos = wpa_supplicant_ie_txt(pos, end, "WPA", ie, 2 + ie[1]);
|
pos = wpa_supplicant_ie_txt(pos, end, "WPA", ie, 2 + ie[1]);
|
||||||
ie2 = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
ie2 = wpa_bss_get_rsne(wpa_s, bss, NULL, false);
|
||||||
if (ie2) {
|
if (ie2) {
|
||||||
pos = wpa_supplicant_ie_txt(pos, end, mesh ? "RSN" : "WPA2",
|
pos = wpa_supplicant_ie_txt(pos, end, mesh ? "RSN" : "WPA2",
|
||||||
ie2, 2 + ie2[1]);
|
ie2, 2 + ie2[1]);
|
||||||
}
|
}
|
||||||
rsnxe = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
rsnxe = wpa_bss_get_rsnxe(wpa_s, bss, NULL, false);
|
||||||
if (ieee802_11_rsnx_capab(rsnxe, WLAN_RSNX_CAPAB_SAE_H2E)) {
|
if (ieee802_11_rsnx_capab(rsnxe, WLAN_RSNX_CAPAB_SAE_H2E)) {
|
||||||
ret = os_snprintf(pos, end - pos, "[SAE-H2E]");
|
ret = os_snprintf(pos, end - pos, "[SAE-H2E]");
|
||||||
if (os_snprintf_error(end - pos, ret))
|
if (os_snprintf_error(end - pos, ret))
|
||||||
|
@ -5444,12 +5444,12 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
if (ie)
|
if (ie)
|
||||||
pos = wpa_supplicant_ie_txt(pos, end, "WPA", ie,
|
pos = wpa_supplicant_ie_txt(pos, end, "WPA", ie,
|
||||||
2 + ie[1]);
|
2 + ie[1]);
|
||||||
ie2 = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
ie2 = wpa_bss_get_rsne(wpa_s, bss, NULL, false);
|
||||||
if (ie2)
|
if (ie2)
|
||||||
pos = wpa_supplicant_ie_txt(pos, end,
|
pos = wpa_supplicant_ie_txt(pos, end,
|
||||||
mesh ? "RSN" : "WPA2", ie2,
|
mesh ? "RSN" : "WPA2", ie2,
|
||||||
2 + ie2[1]);
|
2 + ie2[1]);
|
||||||
rsnxe = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
rsnxe = wpa_bss_get_rsnxe(wpa_s, bss, NULL, false);
|
||||||
if (ieee802_11_rsnx_capab(rsnxe, WLAN_RSNX_CAPAB_SAE_H2E)) {
|
if (ieee802_11_rsnx_capab(rsnxe, WLAN_RSNX_CAPAB_SAE_H2E)) {
|
||||||
ret = os_snprintf(pos, end - pos, "[SAE-H2E]");
|
ret = os_snprintf(pos, end - pos, "[SAE-H2E]");
|
||||||
if (os_snprintf_error(end - pos, ret))
|
if (os_snprintf_error(end - pos, ret))
|
||||||
|
|
|
@ -5635,7 +5635,7 @@ dbus_bool_t wpas_dbus_getter_bss_rsn(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
os_memset(&wpa_data, 0, sizeof(wpa_data));
|
os_memset(&wpa_data, 0, sizeof(wpa_data));
|
||||||
ie = wpa_bss_get_ie(res, WLAN_EID_RSN);
|
ie = wpa_bss_get_rsne(args->wpa_s, res, NULL, false);
|
||||||
if (ie && wpa_parse_wpa_ie(ie, 2 + ie[1], &wpa_data) < 0) {
|
if (ie && wpa_parse_wpa_ie(ie, 2 + ie[1], &wpa_data) < 0) {
|
||||||
dbus_set_error_const(error, DBUS_ERROR_FAILED,
|
dbus_set_error_const(error, DBUS_ERROR_FAILED,
|
||||||
"failed to parse RSN IE");
|
"failed to parse RSN IE");
|
||||||
|
|
|
@ -4500,7 +4500,7 @@ int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
||||||
|
|
||||||
if (!(ssid->key_mgmt & WPA_KEY_MGMT_DPP) || !bss)
|
if (!(ssid->key_mgmt & WPA_KEY_MGMT_DPP) || !bss)
|
||||||
return 0; /* Not using DPP AKM - continue */
|
return 0; /* Not using DPP AKM - continue */
|
||||||
rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
rsn = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &ied) == 0 &&
|
if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &ied) == 0 &&
|
||||||
!(ied.key_mgmt & WPA_KEY_MGMT_DPP))
|
!(ied.key_mgmt & WPA_KEY_MGMT_DPP))
|
||||||
return 0; /* AP does not support DPP AKM - continue */
|
return 0; /* AP does not support DPP AKM - continue */
|
||||||
|
|
|
@ -670,7 +670,7 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
|
||||||
(ssid->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA));
|
(ssid->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA));
|
||||||
#endif /* CONFIG_WEP */
|
#endif /* CONFIG_WEP */
|
||||||
|
|
||||||
rsn_ie = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
rsn_ie = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
if (is_6ghz_bss && !rsn_ie) {
|
if (is_6ghz_bss && !rsn_ie) {
|
||||||
if (debug_print)
|
if (debug_print)
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||||
|
@ -1143,7 +1143,7 @@ static void owe_trans_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
u8 ssid_len;
|
u8 ssid_len;
|
||||||
|
|
||||||
owe = wpa_bss_get_vendor_ie(bss, OWE_IE_VENDOR_TYPE);
|
owe = wpa_bss_get_vendor_ie(bss, OWE_IE_VENDOR_TYPE);
|
||||||
if (!owe || !wpa_bss_get_ie(bss, WLAN_EID_RSN))
|
if (!owe || !wpa_bss_get_rsne(wpa_s, bss, NULL, false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pos = owe + 6;
|
pos = owe + 6;
|
||||||
|
@ -1247,7 +1247,7 @@ static bool sae_pk_acceptable_bss_with_pk(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
if (bss == orig_bss)
|
if (bss == orig_bss)
|
||||||
continue;
|
continue;
|
||||||
ie = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
ie = wpa_bss_get_rsnxe(wpa_s, bss, ssid, false);
|
||||||
if (!(ieee802_11_rsnx_capab(ie, WLAN_RSNX_CAPAB_SAE_PK)))
|
if (!(ieee802_11_rsnx_capab(ie, WLAN_RSNX_CAPAB_SAE_PK)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1286,7 +1286,7 @@ static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
||||||
|
|
||||||
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
||||||
wpa = ie && ie[1];
|
wpa = ie && ie[1];
|
||||||
ie = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
ie = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
wpa |= ie && ie[1];
|
wpa |= ie && ie[1];
|
||||||
if (ie && wpa_parse_wpa_ie_rsn(ie, 2 + ie[1], &data) == 0 &&
|
if (ie && wpa_parse_wpa_ie_rsn(ie, 2 + ie[1], &data) == 0 &&
|
||||||
(data.key_mgmt & WPA_KEY_MGMT_OSEN))
|
(data.key_mgmt & WPA_KEY_MGMT_OSEN))
|
||||||
|
@ -1295,7 +1295,7 @@ static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
||||||
osen = ie != NULL;
|
osen = ie != NULL;
|
||||||
|
|
||||||
#ifdef CONFIG_SAE
|
#ifdef CONFIG_SAE
|
||||||
ie = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
ie = wpa_bss_get_rsnxe(wpa_s, bss, ssid, false);
|
||||||
if (ie && ie[1] >= 1)
|
if (ie && ie[1] >= 1)
|
||||||
rsnxe_capa = ie[2];
|
rsnxe_capa = ie[2];
|
||||||
#endif /* CONFIG_SAE */
|
#endif /* CONFIG_SAE */
|
||||||
|
@ -1650,7 +1650,7 @@ struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
|
||||||
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
||||||
wpa_ie_len = ie ? ie[1] : 0;
|
wpa_ie_len = ie ? ie[1] : 0;
|
||||||
|
|
||||||
ie = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
ie = wpa_bss_get_rsne(wpa_s, bss, NULL, false);
|
||||||
rsn_ie_len = ie ? ie[1] : 0;
|
rsn_ie_len = ie ? ie[1] : 0;
|
||||||
|
|
||||||
ie = wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE);
|
ie = wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE);
|
||||||
|
@ -2117,7 +2117,7 @@ static void wpa_supplicant_rsn_preauth_scan_results(
|
||||||
if (ssid == NULL)
|
if (ssid == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
rsn = wpa_bss_get_rsne(wpa_s, bss, NULL, false);
|
||||||
if (rsn == NULL)
|
if (rsn == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -3267,7 +3267,7 @@ static int wpa_supplicant_use_own_rsne_params(struct wpa_supplicant *wpa_s,
|
||||||
if (wpa_s->wpa_proto & (WPA_PROTO_RSN | WPA_PROTO_OSEN)) {
|
if (wpa_s->wpa_proto & (WPA_PROTO_RSN | WPA_PROTO_OSEN)) {
|
||||||
const u8 *bss_rsn;
|
const u8 *bss_rsn;
|
||||||
|
|
||||||
bss_rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
bss_rsn = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
if (bss_rsn) {
|
if (bss_rsn) {
|
||||||
p = bss_rsn;
|
p = bss_rsn;
|
||||||
len = 2 + bss_rsn[1];
|
len = 2 + bss_rsn[1];
|
||||||
|
@ -3721,8 +3721,8 @@ static int wpa_supplicant_assoc_update_ie(struct wpa_supplicant *wpa_s)
|
||||||
|
|
||||||
bss_wpa = wpa_bss_get_vendor_ie(wpa_s->current_bss,
|
bss_wpa = wpa_bss_get_vendor_ie(wpa_s->current_bss,
|
||||||
WPA_IE_VENDOR_TYPE);
|
WPA_IE_VENDOR_TYPE);
|
||||||
bss_rsn = wpa_bss_get_ie(wpa_s->current_bss, WLAN_EID_RSN);
|
bss_rsn = wpa_bss_get_rsne(wpa_s, wpa_s->current_bss, NULL, false);
|
||||||
bss_rsnx = wpa_bss_get_ie(wpa_s->current_bss, WLAN_EID_RSNX);
|
bss_rsnx = wpa_bss_get_rsnxe(wpa_s, wpa_s->current_bss, NULL, false);
|
||||||
|
|
||||||
if (wpa_sm_set_ap_wpa_ie(wpa_s->wpa, bss_wpa,
|
if (wpa_sm_set_ap_wpa_ie(wpa_s->wpa, bss_wpa,
|
||||||
bss_wpa ? 2 + bss_wpa[1] : 0) ||
|
bss_wpa ? 2 + bss_wpa[1] : 0) ||
|
||||||
|
@ -4110,8 +4110,8 @@ static int wpa_sm_set_ml_info(struct wpa_supplicant *wpa_s)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bss_rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
bss_rsn = wpa_bss_get_rsne(wpa_s, bss, NULL, true);
|
||||||
bss_rsnx = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
bss_rsnx = wpa_bss_get_rsnxe(wpa_s, bss, NULL, true);
|
||||||
|
|
||||||
wpa_mlo.links[i].ap_rsne = bss_rsn ? (u8 *) bss_rsn : NULL;
|
wpa_mlo.links[i].ap_rsne = bss_rsn ? (u8 *) bss_rsn : NULL;
|
||||||
wpa_mlo.links[i].ap_rsne_len = bss_rsn ? 2 + bss_rsn[1] : 0;
|
wpa_mlo.links[i].ap_rsne_len = bss_rsn ? 2 + bss_rsn[1] : 0;
|
||||||
|
|
|
@ -1087,7 +1087,7 @@ void hs20_osu_icon_fetch(struct wpa_supplicant *wpa_s)
|
||||||
prov_anqp = bss->anqp->hs20_osu_providers_list;
|
prov_anqp = bss->anqp->hs20_osu_providers_list;
|
||||||
if (prov_anqp == NULL)
|
if (prov_anqp == NULL)
|
||||||
continue;
|
continue;
|
||||||
ie = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
ie = wpa_bss_get_rsne(wpa_s, bss, NULL, false);
|
||||||
if (ie && wpa_parse_wpa_ie(ie, 2 + ie[1], &data) == 0 &&
|
if (ie && wpa_parse_wpa_ie(ie, 2 + ie[1], &data) == 0 &&
|
||||||
(data.key_mgmt & WPA_KEY_MGMT_OSEN)) {
|
(data.key_mgmt & WPA_KEY_MGMT_OSEN)) {
|
||||||
osu_ssid2 = bss->ssid;
|
osu_ssid2 = bss->ssid;
|
||||||
|
|
|
@ -1726,7 +1726,7 @@ int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
" for connection",
|
" for connection",
|
||||||
MAC2STR(bss->bssid));
|
MAC2STR(bss->bssid));
|
||||||
|
|
||||||
if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) {
|
if (!wpa_bss_get_rsne(wpa_s, bss, NULL, false)) {
|
||||||
/*
|
/*
|
||||||
* We currently support only HS 2.0 networks and those are
|
* We currently support only HS 2.0 networks and those are
|
||||||
* required to use WPA2-Enterprise.
|
* required to use WPA2-Enterprise.
|
||||||
|
@ -2459,7 +2459,7 @@ static struct wpa_bss * pick_best_roaming_partner(struct wpa_supplicant *wpa_s,
|
||||||
cred2 = interworking_credentials_available(wpa_s, bss, NULL);
|
cred2 = interworking_credentials_available(wpa_s, bss, NULL);
|
||||||
if (!cred2)
|
if (!cred2)
|
||||||
continue;
|
continue;
|
||||||
if (!wpa_bss_get_ie(bss, WLAN_EID_RSN))
|
if (!wpa_bss_get_rsne(wpa_s, bss, NULL, false))
|
||||||
continue;
|
continue;
|
||||||
prio = roaming_prio(wpa_s, cred2, bss);
|
prio = roaming_prio(wpa_s, cred2, bss);
|
||||||
wpa_printf(MSG_DEBUG, "Interworking: roaming_prio=%u for BSS "
|
wpa_printf(MSG_DEBUG, "Interworking: roaming_prio=%u for BSS "
|
||||||
|
@ -2511,7 +2511,7 @@ static void interworking_select_network(struct wpa_supplicant *wpa_s)
|
||||||
if (!cred)
|
if (!cred)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) {
|
if (!wpa_bss_get_rsne(wpa_s, bss, NULL, false)) {
|
||||||
/*
|
/*
|
||||||
* We currently support only HS 2.0 networks and those
|
* We currently support only HS 2.0 networks and those
|
||||||
* are required to use WPA2-Enterprise.
|
* are required to use WPA2-Enterprise.
|
||||||
|
|
|
@ -115,7 +115,7 @@ void wpas_mbo_check_pmf(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
return;
|
return;
|
||||||
if (oce && oce[1] >= 1 && (oce[2] & OCE_IS_STA_CFON))
|
if (oce && oce[1] >= 1 && (oce[2] & OCE_IS_STA_CFON))
|
||||||
return; /* STA-CFON is not required to enable PMF */
|
return; /* STA-CFON is not required to enable PMF */
|
||||||
rsne = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
rsne = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
if (!rsne || wpa_parse_wpa_ie(rsne, 2 + rsne[1], &ie) < 0)
|
if (!rsne || wpa_parse_wpa_ie(rsne, 2 + rsne[1], &ie) < 0)
|
||||||
return; /* AP is not using RSN */
|
return; /* AP is not using RSN */
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ static int wpas_pasn_get_params_from_bss(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rsne = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
rsne = wpa_bss_get_rsne(wpa_s, bss, NULL, false);
|
||||||
if (!rsne) {
|
if (!rsne) {
|
||||||
wpa_printf(MSG_DEBUG, "PASN: BSS without RSNE");
|
wpa_printf(MSG_DEBUG, "PASN: BSS without RSNE");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -186,7 +186,7 @@ static int wpas_pasn_get_params_from_bss(struct wpa_supplicant *wpa_s,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rsnxe = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
rsnxe = wpa_bss_get_rsnxe(wpa_s, bss, NULL, false);
|
||||||
|
|
||||||
ssid_str_len = bss->ssid_len;
|
ssid_str_len = bss->ssid_len;
|
||||||
ssid_str = bss->ssid;
|
ssid_str = bss->ssid;
|
||||||
|
@ -480,7 +480,7 @@ static struct wpa_bss * wpas_pasn_allowed(struct wpa_supplicant *wpa_s,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rsne = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
rsne = wpa_bss_get_rsne(wpa_s, bss, NULL, false);
|
||||||
if (!rsne) {
|
if (!rsne) {
|
||||||
wpa_printf(MSG_DEBUG, "PASN: BSS without RSNE");
|
wpa_printf(MSG_DEBUG, "PASN: BSS without RSNE");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -544,13 +544,13 @@ static void wpas_pasn_auth_start_cb(struct wpa_radio_work *work, int deinit)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
rsne = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
rsne = wpa_bss_get_rsne(wpa_s, bss, NULL, false);
|
||||||
if (!rsne) {
|
if (!rsne) {
|
||||||
wpa_printf(MSG_DEBUG, "PASN: BSS without RSNE");
|
wpa_printf(MSG_DEBUG, "PASN: BSS without RSNE");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
rsnxe = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
rsnxe = wpa_bss_get_rsnxe(wpa_s, bss, NULL, false);
|
||||||
|
|
||||||
derive_kdk = (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF_STA) &&
|
derive_kdk = (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF_STA) &&
|
||||||
ieee802_11_rsnx_capab(rsnxe,
|
ieee802_11_rsnx_capab(rsnxe,
|
||||||
|
|
|
@ -190,7 +190,7 @@ static struct wpabuf * sme_auth_build_sae_commit(struct wpa_supplicant *wpa_s,
|
||||||
if (bss) {
|
if (bss) {
|
||||||
const u8 *rsnxe;
|
const u8 *rsnxe;
|
||||||
|
|
||||||
rsnxe = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
rsnxe = wpa_bss_get_rsnxe(wpa_s, bss, ssid, false);
|
||||||
if (rsnxe && rsnxe[1] >= 1)
|
if (rsnxe && rsnxe[1] >= 1)
|
||||||
rsnxe_capa = rsnxe[2];
|
rsnxe_capa = rsnxe[2];
|
||||||
}
|
}
|
||||||
|
@ -643,7 +643,7 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
|
||||||
const u8 *rsn;
|
const u8 *rsn;
|
||||||
struct wpa_ie_data ied;
|
struct wpa_ie_data ied;
|
||||||
|
|
||||||
rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
rsn = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
if (!rsn) {
|
if (!rsn) {
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||||
"SAE enabled, but target BSS does not advertise RSN");
|
"SAE enabled, but target BSS does not advertise RSN");
|
||||||
|
@ -683,7 +683,7 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
|
||||||
#endif /* CONFIG_WEP */
|
#endif /* CONFIG_WEP */
|
||||||
|
|
||||||
if ((wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) ||
|
if ((wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) ||
|
||||||
wpa_bss_get_ie(bss, WLAN_EID_RSN)) &&
|
wpa_bss_get_rsne(wpa_s, bss, ssid, false)) &&
|
||||||
wpa_key_mgmt_wpa(ssid->key_mgmt)) {
|
wpa_key_mgmt_wpa(ssid->key_mgmt)) {
|
||||||
int try_opportunistic;
|
int try_opportunistic;
|
||||||
const u8 *cache_id = NULL;
|
const u8 *cache_id = NULL;
|
||||||
|
@ -807,7 +807,7 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG, "SME: FT mobility domain %02x%02x",
|
wpa_dbg(wpa_s, MSG_DEBUG, "SME: FT mobility domain %02x%02x",
|
||||||
md[0], md[1]);
|
md[0], md[1]);
|
||||||
|
|
||||||
omit_rsnxe = !wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
omit_rsnxe = !wpa_bss_get_rsnxe(wpa_s, bss, ssid, false);
|
||||||
if (wpa_s->sme.assoc_req_ie_len + 5 <
|
if (wpa_s->sme.assoc_req_ie_len + 5 <
|
||||||
sizeof(wpa_s->sme.assoc_req_ie)) {
|
sizeof(wpa_s->sme.assoc_req_ie)) {
|
||||||
struct rsn_mdie *mdie;
|
struct rsn_mdie *mdie;
|
||||||
|
@ -836,7 +836,7 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
wpa_s->sme.mfp = wpas_get_ssid_pmf(wpa_s, ssid);
|
wpa_s->sme.mfp = wpas_get_ssid_pmf(wpa_s, ssid);
|
||||||
if (wpa_s->sme.mfp != NO_MGMT_FRAME_PROTECTION) {
|
if (wpa_s->sme.mfp != NO_MGMT_FRAME_PROTECTION) {
|
||||||
const u8 *rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
const u8 *rsn = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
struct wpa_ie_data _ie;
|
struct wpa_ie_data _ie;
|
||||||
if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &_ie) == 0 &&
|
if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &_ie) == 0 &&
|
||||||
_ie.capabilities &
|
_ie.capabilities &
|
||||||
|
|
|
@ -1700,8 +1700,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
if (bss) {
|
if (bss) {
|
||||||
bss_wpa = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
bss_wpa = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
||||||
bss_rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
bss_rsn = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
bss_rsnx = wpa_bss_get_ie(bss, WLAN_EID_RSNX);
|
bss_rsnx = wpa_bss_get_rsnxe(wpa_s, bss, ssid, false);
|
||||||
bss_osen = wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE);
|
bss_osen = wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE);
|
||||||
} else {
|
} else {
|
||||||
bss_wpa = bss_rsn = bss_rsnx = bss_osen = NULL;
|
bss_wpa = bss_rsn = bss_rsnx = bss_osen = NULL;
|
||||||
|
@ -3456,7 +3456,7 @@ static u8 * wpas_populate_assoc_ies(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bss && (wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) ||
|
if (bss && (wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) ||
|
||||||
wpa_bss_get_ie(bss, WLAN_EID_RSN)) &&
|
wpa_bss_get_rsne(wpa_s, bss, ssid, false)) &&
|
||||||
wpa_key_mgmt_wpa(ssid->key_mgmt)) {
|
wpa_key_mgmt_wpa(ssid->key_mgmt)) {
|
||||||
int try_opportunistic;
|
int try_opportunistic;
|
||||||
const u8 *cache_id = NULL;
|
const u8 *cache_id = NULL;
|
||||||
|
@ -4497,7 +4497,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
|
||||||
|
|
||||||
params.mgmt_frame_protection = wpas_get_ssid_pmf(wpa_s, ssid);
|
params.mgmt_frame_protection = wpas_get_ssid_pmf(wpa_s, ssid);
|
||||||
if (params.mgmt_frame_protection != NO_MGMT_FRAME_PROTECTION && bss) {
|
if (params.mgmt_frame_protection != NO_MGMT_FRAME_PROTECTION && bss) {
|
||||||
const u8 *rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
const u8 *rsn = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
struct wpa_ie_data ie;
|
struct wpa_ie_data ie;
|
||||||
if (!wpas_driver_bss_selection(wpa_s) && rsn &&
|
if (!wpas_driver_bss_selection(wpa_s) && rsn &&
|
||||||
wpa_parse_wpa_ie(rsn, 2 + rsn[1], &ie) == 0 &&
|
wpa_parse_wpa_ie(rsn, 2 + rsn[1], &ie) == 0 &&
|
||||||
|
|
|
@ -425,11 +425,11 @@ static int wpa_get_beacon_ie(struct wpa_supplicant *wpa_s)
|
||||||
if (wpa_sm_set_ap_wpa_ie(wpa_s->wpa, ie, ie ? 2 + ie[1] : 0))
|
if (wpa_sm_set_ap_wpa_ie(wpa_s->wpa, ie, ie ? 2 + ie[1] : 0))
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
ie = wpa_bss_get_ie(curr, WLAN_EID_RSN);
|
ie = wpa_bss_get_rsne(wpa_s, curr, ssid, false);
|
||||||
if (wpa_sm_set_ap_rsn_ie(wpa_s->wpa, ie, ie ? 2 + ie[1] : 0))
|
if (wpa_sm_set_ap_rsn_ie(wpa_s->wpa, ie, ie ? 2 + ie[1] : 0))
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
ie = wpa_bss_get_ie(curr, WLAN_EID_RSNX);
|
ie = wpa_bss_get_rsnxe(wpa_s, curr, ssid, false);
|
||||||
if (wpa_sm_set_ap_rsnxe(wpa_s->wpa, ie, ie ? 2 + ie[1] : 0))
|
if (wpa_sm_set_ap_rsnxe(wpa_s->wpa, ie, ie ? 2 + ie[1] : 0))
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -226,7 +226,7 @@ static void wpas_wps_security_workaround(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "WPS: AP found from BSS table");
|
wpa_printf(MSG_DEBUG, "WPS: AP found from BSS table");
|
||||||
|
|
||||||
ie = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
ie = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
|
||||||
if (ie && wpa_parse_wpa_ie(ie, 2 + ie[1], &adv) == 0) {
|
if (ie && wpa_parse_wpa_ie(ie, 2 + ie[1], &adv) == 0) {
|
||||||
wpa2 = 1;
|
wpa2 = 1;
|
||||||
if (adv.pairwise_cipher & WPA_CIPHER_CCMP)
|
if (adv.pairwise_cipher & WPA_CIPHER_CCMP)
|
||||||
|
|
Loading…
Reference in a new issue