]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make "SET non_pref_chan .." behavior more consistent
authorJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 21:35:48 +0000 (23:35 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 22:10:57 +0000 (00:10 +0200)
non_pref_chan is a global configuration parameter for wpa_supplicant and
the special control interface SET command handler for it was 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 be178d7e48e525a0b9333aedf4b78ca0142e736c..4b5d43c85bd9f5c2d219a2790045506ef89e8cf8 100644 (file)
@@ -527,6 +527,10 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
 #ifdef CONFIG_MBO
        } else if (os_strcasecmp(cmd, "non_pref_chan") == 0) {
                ret = wpas_mbo_update_non_pref_chan(wpa_s, value);
+               if (ret == 0) {
+                       value[-1] = '=';
+                       wpa_config_process_global(wpa_s->conf, cmd, -1);
+               }
        } else if (os_strcasecmp(cmd, "mbo_cell_capa") == 0) {
                wpas_mbo_update_cell_capa(wpa_s, atoi(value));
 #endif /* CONFIG_MBO */