[RFC] supplicant: Disassociate on reconfigure if ssid changes.
Ben Greear
greearb
Mon Jan 10 13:56:19 PST 2011
Otherwise, it's possible that the station stays on the
old SSID if the new SSID cannot be detected in the scan.
Signed-off-by: Ben Greear <greearb at candelatech.com>
---
:100644 100644 5a72426... 20d11f8... M wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 5a72426..20d11f8 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -663,8 +663,11 @@ int wpa_supplicant_reload_configuration(struct wpa_supplicant *wpa_s)
eapol_sm_invalidate_cached_session(wpa_s->eapol);
old_ssid = wpa_s->current_ssid;
wpa_s->current_ssid = NULL;
- if (old_ssid != wpa_s->current_ssid)
+ if (old_ssid != wpa_s->current_ssid) {
+ wpa_supplicant_disassociate(
+ wpa_s, WLAN_REASON_DEAUTH_LEAVING);
wpas_notify_network_changed(wpa_s);
+ }
/*
* TODO: should notify EAPOL SM about changes in opensc_engine_path,
--
1.7.2.3
More information about the Hostap
mailing list