mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
WPS: Fix AP operation with internal Registrar when ER is also active
Ignore the pending WPS message from ER (PutWLANReseponse action) if the internal Registrar has already sent out M2.
This commit is contained in:
parent
7796f20edc
commit
e0b3b3cb77
@ -104,6 +104,7 @@ struct wps_data {
|
||||
u16 config_error;
|
||||
|
||||
int ext_reg;
|
||||
int int_reg;
|
||||
|
||||
struct wps_credential *new_ap_settings;
|
||||
|
||||
|
@ -1357,6 +1357,7 @@ static struct wpabuf * wps_build_m2(struct wps_data *wps)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wps->int_reg = 1;
|
||||
wps->state = RECV_M3;
|
||||
return msg;
|
||||
}
|
||||
@ -1557,7 +1558,7 @@ struct wpabuf * wps_registrar_get_msg(struct wps_data *wps,
|
||||
struct wpabuf *msg;
|
||||
|
||||
#ifdef CONFIG_WPS_UPNP
|
||||
if (wps->wps->wps_upnp) {
|
||||
if (!wps->int_reg && wps->wps->wps_upnp) {
|
||||
struct upnp_pending_message *p, *prev = NULL;
|
||||
if (wps->ext_reg > 1)
|
||||
wps_registrar_free_pending_m2(wps->wps);
|
||||
|
Loading…
Reference in New Issue
Block a user