]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Do not invalidate EAP session cache on all network block parameter changes
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 16 Mar 2016 17:44:32 +0000 (19:44 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 16 Mar 2016 17:44:32 +0000 (19:44 +0200)
The bssid and priority parameters in a network block do not have any
effect on the validity of an EAP session entry, so avoid flushing the
cached session when only these parameters are changed. This is mainly to
allow forced roaming or network selection changes without causing fast
reauthentication to be disabled if the changes are done during RSN
association that used EAP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/ctrl_iface.c

index 4e16987139d09cbb1c0e37025f04800853d3a36e..6be9385820e23071ed86e1a444f0a1810f94244d 100644 (file)
@@ -2976,15 +2976,17 @@ static int wpa_supplicant_ctrl_iface_update_network(
        }
 
        if (os_strcmp(name, "bssid") != 0 &&
-           os_strcmp(name, "priority") != 0)
+           os_strcmp(name, "priority") != 0) {
                wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
 
-       if (wpa_s->current_ssid == ssid || wpa_s->current_ssid == NULL) {
-               /*
-                * Invalidate the EAP session cache if anything in the current
-                * or previously used configuration changes.
-                */
-               eapol_sm_invalidate_cached_session(wpa_s->eapol);
+               if (wpa_s->current_ssid == ssid ||
+                   wpa_s->current_ssid == NULL) {
+                       /*
+                        * Invalidate the EAP session cache if anything in the
+                        * current or previously used configuration changes.
+                        */
+                       eapol_sm_invalidate_cached_session(wpa_s->eapol);
+               }
        }
 
        if ((os_strcmp(name, "psk") == 0 &&