|
@@ -377,8 +377,15 @@ static void hostapd_dpp_set_configurator(struct hostapd_data *hapd,
|
|
goto fail;
|
|
goto fail;
|
|
os_memcpy(conf_sta->ssid, ssid, ssid_len);
|
|
os_memcpy(conf_sta->ssid, ssid, ssid_len);
|
|
conf_sta->ssid_len = ssid_len;
|
|
conf_sta->ssid_len = ssid_len;
|
|
- if (os_strstr(cmd, " conf=sta-psk")) {
|
|
|
|
- conf_sta->dpp = 0;
|
|
|
|
|
|
+ if (os_strstr(cmd, " conf=sta-psk") ||
|
|
|
|
+ os_strstr(cmd, " conf=sta-sae") ||
|
|
|
|
+ os_strstr(cmd, " conf=sta-psk-sae")) {
|
|
|
|
+ if (os_strstr(cmd, " conf=sta-psk-sae"))
|
|
|
|
+ conf_sta->akm = DPP_AKM_PSK_SAE;
|
|
|
|
+ else if (os_strstr(cmd, " conf=sta-sae"))
|
|
|
|
+ conf_sta->akm = DPP_AKM_SAE;
|
|
|
|
+ else
|
|
|
|
+ conf_sta->akm = DPP_AKM_PSK;
|
|
if (psk_set) {
|
|
if (psk_set) {
|
|
os_memcpy(conf_sta->psk, psk, PMK_LEN);
|
|
os_memcpy(conf_sta->psk, psk, PMK_LEN);
|
|
} else {
|
|
} else {
|
|
@@ -387,7 +394,7 @@ static void hostapd_dpp_set_configurator(struct hostapd_data *hapd,
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
} else if (os_strstr(cmd, " conf=sta-dpp")) {
|
|
} else if (os_strstr(cmd, " conf=sta-dpp")) {
|
|
- conf_sta->dpp = 1;
|
|
|
|
|
|
+ conf_sta->akm = DPP_AKM_DPP;
|
|
} else {
|
|
} else {
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
@@ -399,8 +406,15 @@ static void hostapd_dpp_set_configurator(struct hostapd_data *hapd,
|
|
goto fail;
|
|
goto fail;
|
|
os_memcpy(conf_ap->ssid, ssid, ssid_len);
|
|
os_memcpy(conf_ap->ssid, ssid, ssid_len);
|
|
conf_ap->ssid_len = ssid_len;
|
|
conf_ap->ssid_len = ssid_len;
|
|
- if (os_strstr(cmd, " conf=ap-psk")) {
|
|
|
|
- conf_ap->dpp = 0;
|
|
|
|
|
|
+ if (os_strstr(cmd, " conf=ap-psk") ||
|
|
|
|
+ os_strstr(cmd, " conf=ap-sae") ||
|
|
|
|
+ os_strstr(cmd, " conf=ap-psk-sae")) {
|
|
|
|
+ if (os_strstr(cmd, " conf=ap-psk-sae"))
|
|
|
|
+ conf_ap->akm = DPP_AKM_PSK_SAE;
|
|
|
|
+ else if (os_strstr(cmd, " conf=ap-sae"))
|
|
|
|
+ conf_ap->akm = DPP_AKM_SAE;
|
|
|
|
+ else
|
|
|
|
+ conf_ap->akm = DPP_AKM_PSK;
|
|
if (psk_set) {
|
|
if (psk_set) {
|
|
os_memcpy(conf_ap->psk, psk, PMK_LEN);
|
|
os_memcpy(conf_ap->psk, psk, PMK_LEN);
|
|
} else {
|
|
} else {
|
|
@@ -409,7 +423,7 @@ static void hostapd_dpp_set_configurator(struct hostapd_data *hapd,
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
} else if (os_strstr(cmd, " conf=ap-dpp")) {
|
|
} else if (os_strstr(cmd, " conf=ap-dpp")) {
|
|
- conf_ap->dpp = 1;
|
|
|
|
|
|
+ conf_ap->akm = DPP_AKM_DPP;
|
|
} else {
|
|
} else {
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|