From 20df273b4526b0199a12cef132dab73f5e2dcae1 Mon Sep 17 00:00:00 2001 From: Ben Greear Date: Mon, 10 Jan 2011 15:00:56 -0800 Subject: [PATCH 07/16] supplicant: Disassociate on reconfigure if ssid changes. 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 --- :100644 100644 4f58f76... 641aaf4... 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 4f58f76..641aaf4 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -668,8 +668,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.6.2.5