aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-08-05 20:52:10 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-06 17:47:25 (GMT)
commit7e97d813ee4d1886816f0c03443c5bf8b27e2966 (patch)
tree83950060af1f3971b6cd86b0cd3dfab93e33502e /src/wps
parent133716a7227c408f54d8a1eeaafc5f198ab5691b (diff)
downloadhostap-7e97d813ee4d1886816f0c03443c5bf8b27e2966.zip
hostap-7e97d813ee4d1886816f0c03443c5bf8b27e2966.tar.gz
hostap-7e97d813ee4d1886816f0c03443c5bf8b27e2966.tar.bz2
WPS: Reject AP settings with invalid network key (PSK/passphrase)
This is similar to the earlier commit b363121a208e3d18fe80682430a5f50cefaa3595 ('WPS: Reject invalid credential more cleanly'), but for the AP cases where AP settings are being replaced. Previously, the new settings were taken into use even if the invalid PSK/passphrase had to be removed. Now, the settings are rejected with such an invalid configuration. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_enrollee.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c
index 89957b1..53b79e3 100644
--- a/src/wps/wps_enrollee.c
+++ b/src/wps/wps_enrollee.c
@@ -799,6 +799,7 @@ static int wps_process_ap_settings_e(struct wps_data *wps,
struct wpabuf *attrs, int wps2)
{
struct wps_credential cred;
+ int ret = 0;
if (!wps->wps->ap)
return 0;
@@ -877,10 +878,10 @@ static int wps_process_ap_settings_e(struct wps_data *wps,
if (wps->wps->cred_cb) {
cred.cred_attr = wpabuf_head(attrs);
cred.cred_attr_len = wpabuf_len(attrs);
- wps->wps->cred_cb(wps->wps->cb_ctx, &cred);
+ ret = wps->wps->cred_cb(wps->wps->cb_ctx, &cred);
}
- return 0;
+ return ret;
}