aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-08-24 09:56:11 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-05 14:30:48 (GMT)
commitd52f4054d05973cb2131e9222f20f8b08dcdb8b4 (patch)
treec14195b0296a858cfcabbb3648b273aacec073d4
parent1b91b7290fe45967899c251a97def9a88e026778 (diff)
downloadhostap-07-d52f4054d05973cb2131e9222f20f8b08dcdb8b4.zip
hostap-07-d52f4054d05973cb2131e9222f20f8b08dcdb8b4.tar.gz
hostap-07-d52f4054d05973cb2131e9222f20f8b08dcdb8b4.tar.bz2
WPS: Use WSC_NACK if no device password is known on M2 RX
This can happen on the AP if the AP PIN is not configured and the client tries to go through the protocol instead of just using Registrar mode to receive M1 from the AP. It is cleaner to send out the WSC_NACK instead of just stopping the protocol. (cherry picked from commit 035cc69d980d2e4bdd6e1d1260648f1033194655)
-rw-r--r--src/wps/wps_enrollee.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c
index fbc41e5..68bc802 100644
--- a/src/wps/wps_enrollee.c
+++ b/src/wps/wps_enrollee.c
@@ -782,7 +782,8 @@ static enum wps_process_res wps_process_m2(struct wps_data *wps,
return WPS_CONTINUE;
}
- if (wps->wps->ap && wps->wps->ap_setup_locked) {
+ if (wps->wps->ap &&
+ (wps->wps->ap_setup_locked || wps->dev_password == NULL)) {
wpa_printf(MSG_DEBUG, "WPS: AP Setup is locked - refuse "
"registration of a new Registrar");
wps->config_error = WPS_CFG_SETUP_LOCKED;