WPS: Clear after_wps on new WPS connection
authorJouni Malinen <j@w1.fi>
Sun, 31 Mar 2013 14:17:08 +0000 (17:17 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 31 Mar 2013 15:05:42 +0000 (18:05 +0300)
The after_wps counter could have potentially be left in its old non-zero
value in some WPS sequences which could result in a single-channel scan
being used based on obsolete information. Clear after_wps in
wpas_wps_reassoc() to make sure this does not happen.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/wps_supplicant.c

index 086de92..8ffc692 100644 (file)
@@ -871,6 +871,7 @@ static void wpas_wps_reassoc(struct wpa_supplicant *wpa_s,
        struct wpa_ssid *ssid;
        struct wpa_bss *bss;
 
+       wpa_s->after_wps = 0;
        wpa_s->known_wps_freq = 0;
        if (bssid) {
                bss = wpa_bss_get_bssid_latest(wpa_s, bssid);