]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Fix AP operation with internal Registrar when ER is also active
authorJouni Malinen <jouni.malinen@atheros.com>
Fri, 12 Feb 2010 10:38:14 +0000 (12:38 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 12 Feb 2010 10:38:14 +0000 (12:38 +0200)
Ignore the pending WPS message from ER (PutWLANReseponse action) if the
internal Registrar has already sent out M2.

src/wps/wps_i.h
src/wps/wps_registrar.c

index e036176d76440f9dda714eefa508bd6f7c72fd49..e3a51412ba2120b68f119b06698b086167e9495e 100644 (file)
@@ -104,6 +104,7 @@ struct wps_data {
        u16 config_error;
 
        int ext_reg;
+       int int_reg;
 
        struct wps_credential *new_ap_settings;
 
index db20c7da073c2289f19aae18a0e387ea6c3c1022..30283fe7fb6cfbd47a0b30b4261839c0113a66ec 100644 (file)
@@ -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);