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.
This commit is contained in:
parent
509a39727f
commit
035cc69d98
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue