If the WPS_CANCEL command were issued between the driver command
requesting association and the driver event indicating completion of
association, i.e., within the WPA_ASSOCIATING state, it was possible for
the association to continue and the WPS procedure to be completed after
this.
Address this by forcing deauthentication and WPS state clearing also in
the WPS_ASSOCIATING state and not only if the association has been
completed.
Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_printf(MSG_DEBUG, "WPS: Cancel operation - cancel scan");
wpa_supplicant_cancel_scan(wpa_s);
wpas_clear_wps(wpa_s);
- } else if (wpa_s->wpa_state >= WPA_ASSOCIATED) {
+ } else if (wpa_s->wpa_state >= WPA_ASSOCIATING) {
wpa_printf(MSG_DEBUG, "WPS: Cancel operation - "
"deauthenticate");
wpa_s->own_disconnect_req = 1;