aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2014-01-16 15:35:45 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-07 17:33:19 (GMT)
commitd7a15d5953beb47964526aa17b4dc2e9b2985fc1 (patch)
tree467b85356009c8b453faad48656de9d0e218c975 /src/ap
parentd55fc03ef65e798c9f18f9aec3d1ed34ad534f48 (diff)
downloadhostap-d7a15d5953beb47964526aa17b4dc2e9b2985fc1.zip
hostap-d7a15d5953beb47964526aa17b4dc2e9b2985fc1.tar.gz
hostap-d7a15d5953beb47964526aa17b4dc2e9b2985fc1.tar.bz2
WPS: Indicate current AP settings in M7 in unconfigurated state
Previously, unconfigured state was forcing the best supported authentication and encryption state to be shown in WPS messages, including AP Settings in M7 in case the AP acts as an Enrollee. This is not really correct for the AP Settings case, so change that one to indicate the currently configured state. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/ap')
-rw-r--r--src/ap/wps_hostapd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c
index 1b1dce4..8aafa63 100644
--- a/src/ap/wps_hostapd.c
+++ b/src/ap/wps_hostapd.c
@@ -471,6 +471,8 @@ static int hapd_wps_cred_cb(struct hostapd_data *hapd, void *ctx)
hapd->wps->ssid_len = cred->ssid_len;
hapd->wps->encr_types = cred->encr_type;
hapd->wps->auth_types = cred->auth_type;
+ hapd->wps->ap_encr_type = cred->encr_type;
+ hapd->wps->ap_auth_type = cred->auth_type;
if (cred->key_len == 0) {
os_free(hapd->wps->network_key);
hapd->wps->network_key = NULL;
@@ -1146,6 +1148,8 @@ int hostapd_init_wps(struct hostapd_data *hapd,
wps->psk_set = 1;
}
+ wps->ap_auth_type = wps->auth_types;
+ wps->ap_encr_type = wps->encr_types;
if (conf->wps_state == WPS_STATE_NOT_CONFIGURED) {
/* Override parameters to enable security by default */
wps->auth_types = WPS_AUTH_WPA2PSK | WPS_AUTH_WPAPSK;