aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/notify.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2014-02-25 20:37:57 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-25 20:37:57 (GMT)
commit3d910ef497b11e149cf41e772670f7a7fe3a1e19 (patch)
treef7d1435879d838682fe2ca973188897d1219dc06 /wpa_supplicant/notify.c
parentda60d9c1cadd03c0ed0944cfb7cf3e46d2924efa (diff)
downloadhostap-3d910ef497b11e149cf41e772670f7a7fe3a1e19.zip
hostap-3d910ef497b11e149cf41e772670f7a7fe3a1e19.tar.gz
hostap-3d910ef497b11e149cf41e772670f7a7fe3a1e19.tar.bz2
Interworking: Prefer last added network during network selection
Previously, any network block could be used to select the BSS to connect to when processing scan results after Interworking network selection. This can result in somewhat unexpected network selection in cases where credential preferences indicated that a specific network was selected, but another network ended up getting used for the connection. While the older networks continue to be valid, add special processing for this initial post-interworking-connect case to get more consistent network selection to match with the Interworking network selection result. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/notify.c')
-rw-r--r--wpa_supplicant/notify.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index a82fbf3..2db1d54 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -252,6 +252,8 @@ void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid)
{
+ if (wpa_s->next_ssid == ssid)
+ wpa_s->next_ssid = NULL;
if (wpa_s->wpa)
wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s)