Message ID | 20140812135933.GA28663@w1.fi |
---|---|
State | Superseded |
Headers | show |
Hi Jouni, On Tue, Aug 12, 2014 at 7:29 PM, Jouni Malinen <j@w1.fi> wrote: > What is the key difference for IE mismatch? Updating wpa_s->current_bss > or the call to wpa_supplicant_update_scan_results()? I'd assume it is > the latter. In either case, I'd expect something like this to be a safer > change: Thanks! Yes, It's the latter one (wpa_supplicant_update_scan_results). Your patch looks good to me. That should do the job. I will test it and re-submit the patch. > Jithu Jance
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 4e84f6e..db763a4 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -89,8 +89,20 @@ static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s) 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) { + 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; + return 0; + } wpa_dbg(wpa_s, MSG_DEBUG, "Select network based on association " "information");