]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS ER: Clear WPS state if PutMessage does not include NewOutMessage
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 2 Nov 2010 09:20:54 +0000 (11:20 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 2 Nov 2010 09:20:54 +0000 (11:20 +0200)
This is needed to avoid getting stuck with pending WPS operation, e.g.,
when an AP replies to WSC_NACK with HTTP OK, but without following
message.

src/wps/wps_er.c

index 030726e2dc5f8924190e437f89c354714e9df4a5..d0f3f411fce3e5d52d1c051b4a586b6c92ecc772 100644 (file)
@@ -1617,6 +1617,8 @@ static void wps_er_http_put_message_cb(void *ctx, struct http_client *c,
                if (buf == NULL) {
                        wpa_printf(MSG_DEBUG, "WPS ER: Could not extract "
                                   "NewOutMessage from PutMessage response");
+                       wps_deinit(ap->wps);
+                       ap->wps = NULL;
                        return;
                }
                wps_er_ap_process(ap, buf);