STA: Update scan results for ap_scan=1 skip-selection case also
The commit 5cd4740580
has rearranged the
update scan results code and hence the IEs were not getting updated
properly for ap_scan=1 case. This can result in a 4-way handshake
failure in the roaming case (IE mismatch in 3/4 EAPOL). Fix this by
updating the scan results even if ap_scan=1 is used and network does not
need to get reselected based on association information.
Signed-off-by: Jithu Jance <jithu@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7a4a93b959
commit
068e38771e
1 changed files with 20 additions and 12 deletions
|
@ -83,14 +83,31 @@ static struct wpa_bss * wpa_supplicant_get_new_bss(
|
|||
}
|
||||
|
||||
|
||||
static void wpa_supplicant_update_current_bss(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
struct wpa_bss *bss = wpa_supplicant_get_new_bss(wpa_s, wpa_s->bssid);
|
||||
|
||||
if (!bss) {
|
||||
wpa_supplicant_update_scan_results(wpa_s);
|
||||
|
||||
/* Get the BSS from the new scan results */
|
||||
bss = wpa_supplicant_get_new_bss(wpa_s, wpa_s->bssid);
|
||||
}
|
||||
|
||||
if (bss)
|
||||
wpa_s->current_bss = bss;
|
||||
}
|
||||
|
||||
|
||||
static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
struct wpa_ssid *ssid, *old_ssid;
|
||||
struct wpa_bss *bss;
|
||||
int res;
|
||||
|
||||
if (wpa_s->conf->ap_scan == 1 && wpa_s->current_ssid)
|
||||
if (wpa_s->conf->ap_scan == 1 && wpa_s->current_ssid) {
|
||||
wpa_supplicant_update_current_bss(wpa_s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "Select network based on association "
|
||||
"information");
|
||||
|
@ -136,16 +153,7 @@ static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s)
|
|||
old_ssid = wpa_s->current_ssid;
|
||||
wpa_s->current_ssid = ssid;
|
||||
|
||||
bss = wpa_supplicant_get_new_bss(wpa_s, wpa_s->bssid);
|
||||
if (!bss) {
|
||||
wpa_supplicant_update_scan_results(wpa_s);
|
||||
|
||||
/* Get the BSS from the new scan results */
|
||||
bss = wpa_supplicant_get_new_bss(wpa_s, wpa_s->bssid);
|
||||
}
|
||||
|
||||
if (bss)
|
||||
wpa_s->current_bss = bss;
|
||||
wpa_supplicant_update_current_bss(wpa_s);
|
||||
|
||||
wpa_supplicant_rsn_supp_set_config(wpa_s, wpa_s->current_ssid);
|
||||
wpa_supplicant_initiate_eapol(wpa_s);
|
||||
|
|
Loading…
Reference in a new issue