]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/ctrl_iface.c
Do not clear PMKSA entry or EAP session cache if config does not change
[thirdparty/hostap.git] / wpa_supplicant / ctrl_iface.c
index a79200b54e4217afcf4cbab5b0562bd9974d9eaa..85744379b2d33eb0d95f376c319a338c63ff06cf 100644 (file)
@@ -3003,11 +3003,16 @@ static int wpa_supplicant_ctrl_iface_update_network(
        struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
        char *name, char *value)
 {
-       if (wpa_config_set(ssid, name, value, 0) < 0) {
+       int ret;
+
+       ret = wpa_config_set(ssid, name, value, 0);
+       if (ret < 0) {
                wpa_printf(MSG_DEBUG, "CTRL_IFACE: Failed to set network "
                           "variable '%s'", name);
                return -1;
        }
+       if (ret == 1)
+               return 0; /* No change to the previously configured value */
 
        if (os_strcmp(name, "bssid") != 0 &&
            os_strcmp(name, "priority") != 0) {