]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make "SET" behavior more consistent for dot11RSNA parameters
authorJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 21:44:09 +0000 (23:44 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 22:10:57 +0000 (00:10 +0200)
These parameters are global configuration parameters for wpa_supplicant
and the special control interface SET command handlers for them were
preventing the configuration update. Make this more consistent by
updating the configuration parameter as well since that is what all the
other SET <global config param> commands do.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/ctrl_iface.c

index 4b5d43c85bd9f5c2d219a2790045506ef89e8cf8..4a7b587f236b6c95944095e901efcf15990ef1b9 100644 (file)
@@ -365,16 +365,29 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
                                   -1, -1, -1, atoi(value));
        } else if (os_strcasecmp(cmd, "dot11RSNAConfigPMKLifetime") == 0) {
                if (wpa_sm_set_param(wpa_s->wpa, RSNA_PMK_LIFETIME,
-                                    atoi(value)))
+                                    atoi(value))) {
                        ret = -1;
+               } else {
+                       value[-1] = '=';
+                       wpa_config_process_global(wpa_s->conf, cmd, -1);
+               }
        } else if (os_strcasecmp(cmd, "dot11RSNAConfigPMKReauthThreshold") ==
                   0) {
                if (wpa_sm_set_param(wpa_s->wpa, RSNA_PMK_REAUTH_THRESHOLD,
-                                    atoi(value)))
+                                    atoi(value))) {
                        ret = -1;
+               } else {
+                       value[-1] = '=';
+                       wpa_config_process_global(wpa_s->conf, cmd, -1);
+               }
        } else if (os_strcasecmp(cmd, "dot11RSNAConfigSATimeout") == 0) {
-               if (wpa_sm_set_param(wpa_s->wpa, RSNA_SA_TIMEOUT, atoi(value)))
+               if (wpa_sm_set_param(wpa_s->wpa, RSNA_SA_TIMEOUT,
+                                    atoi(value))) {
                        ret = -1;
+               } else {
+                       value[-1] = '=';
+                       wpa_config_process_global(wpa_s->conf, cmd, -1);
+               }
        } else if (os_strcasecmp(cmd, "wps_fragment_size") == 0) {
                wpa_s->wps_fragment_size = atoi(value);
 #ifdef CONFIG_WPS_TESTING