D-Bus: Clear cached EAP data on network profile changes
This makes D-Bus network profile Set(Properties) clear cached EAP data similarly to how SET_NETWORK does for control interface. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
483dd6a5e0
commit
98a4cd447e
1 changed files with 13 additions and 0 deletions
|
@ -254,6 +254,19 @@ dbus_bool_t set_network_properties(struct wpa_supplicant *wpa_s,
|
||||||
if (wpa_config_set(ssid, entry.key, value, 0) < 0)
|
if (wpa_config_set(ssid, entry.key, value, 0) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
if (os_strcmp(entry.key, "bssid") != 0 &&
|
||||||
|
os_strcmp(entry.key, "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 ((os_strcmp(entry.key, "psk") == 0 &&
|
if ((os_strcmp(entry.key, "psk") == 0 &&
|
||||||
value[0] == '"' && ssid->ssid_len) ||
|
value[0] == '"' && ssid->ssid_len) ||
|
||||||
(os_strcmp(entry.key, "ssid") == 0 && ssid->passphrase))
|
(os_strcmp(entry.key, "ssid") == 0 && ssid->passphrase))
|
||||||
|
|
Loading…
Reference in a new issue