PASN: Fix build without CONFIG_TESTING_OPTIONS=y
force_kdk_derivation is defined within CONFIG_TESTING_OPTIONS, so need to use matching condition when accessing it. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
3467a701cd
commit
f5ad972455
2 changed files with 18 additions and 7 deletions
|
@ -3121,6 +3121,7 @@ static void handle_auth_pasn_1(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
int ret, inc_y;
|
int ret, inc_y;
|
||||||
bool derive_keys;
|
bool derive_keys;
|
||||||
u32 i;
|
u32 i;
|
||||||
|
bool derive_kdk;
|
||||||
|
|
||||||
if (!groups)
|
if (!groups)
|
||||||
groups = default_groups;
|
groups = default_groups;
|
||||||
|
@ -3160,10 +3161,14 @@ static void handle_auth_pasn_1(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
sta->pasn->akmp = rsn_data.key_mgmt;
|
sta->pasn->akmp = rsn_data.key_mgmt;
|
||||||
sta->pasn->cipher = rsn_data.pairwise_cipher;
|
sta->pasn->cipher = rsn_data.pairwise_cipher;
|
||||||
|
|
||||||
if (hapd->conf->force_kdk_derivation ||
|
derive_kdk = (hapd->iface->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF) &&
|
||||||
((hapd->iface->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF) &&
|
ieee802_11_rsnx_capab_len(elems.rsnxe, elems.rsnxe_len,
|
||||||
ieee802_11_rsnx_capab_len(elems.rsnxe, elems.rsnxe_len,
|
WLAN_RSNX_CAPAB_SECURE_LTF);
|
||||||
WLAN_RSNX_CAPAB_SECURE_LTF)))
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
|
if (!derive_kdk)
|
||||||
|
derive_kdk = hapd->conf->force_kdk_derivation;
|
||||||
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
|
if (derive_kdk)
|
||||||
sta->pasn->kdk_len = WPA_KDK_MAX_LEN;
|
sta->pasn->kdk_len = WPA_KDK_MAX_LEN;
|
||||||
else
|
else
|
||||||
sta->pasn->kdk_len = 0;
|
sta->pasn->kdk_len = 0;
|
||||||
|
|
|
@ -1000,6 +1000,7 @@ static int wpas_pasn_start(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
||||||
struct wpa_ssid *ssid = NULL;
|
struct wpa_ssid *ssid = NULL;
|
||||||
struct wpabuf *frame;
|
struct wpabuf *frame;
|
||||||
int ret;
|
int ret;
|
||||||
|
bool derive_kdk;
|
||||||
|
|
||||||
/* TODO: Currently support only ECC groups */
|
/* TODO: Currently support only ECC groups */
|
||||||
if (!dragonfly_suitable_group(group, 1)) {
|
if (!dragonfly_suitable_group(group, 1)) {
|
||||||
|
@ -1079,9 +1080,14 @@ static int wpas_pasn_start(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
||||||
pasn->group = group;
|
pasn->group = group;
|
||||||
pasn->freq = freq;
|
pasn->freq = freq;
|
||||||
|
|
||||||
if (wpa_s->conf->force_kdk_derivation ||
|
derive_kdk = (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF) &&
|
||||||
(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF &&
|
ieee802_11_rsnx_capab(beacon_rsnxe,
|
||||||
ieee802_11_rsnx_capab(beacon_rsnxe, WLAN_RSNX_CAPAB_SECURE_LTF)))
|
WLAN_RSNX_CAPAB_SECURE_LTF);
|
||||||
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
|
if (!derive_kdk)
|
||||||
|
derive_kdk = wpa_s->conf->force_kdk_derivation;
|
||||||
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
|
if (derive_kdk)
|
||||||
pasn->kdk_len = WPA_KDK_MAX_LEN;
|
pasn->kdk_len = WPA_KDK_MAX_LEN;
|
||||||
else
|
else
|
||||||
pasn->kdk_len = 0;
|
pasn->kdk_len = 0;
|
||||||
|
|
Loading…
Reference in a new issue