From: Jouni Malinen Date: Tue, 24 Aug 2010 09:56:11 +0000 (+0300) Subject: WPS: Use WSC_NACK if no device password is known on M2 RX X-Git-Tag: hostap-1-bp~1226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=035cc69d980d2e4bdd6e1d1260648f1033194655;p=thirdparty%2Fhostap.git 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. --- diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c index fbc41e5d2..68bc802b2 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;