]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix hostapd wmm_enabled setup on config reload path
authorJouni Malinen <jouni@codeaurora.org>
Fri, 6 Apr 2018 20:29:11 +0000 (23:29 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 6 Apr 2018 20:29:11 +0000 (23:29 +0300)
If there is no explicit wmm_enabled parameter in the configuration
(i.e., conf->wmm_enabled == -1), the configuration reload path needs to
initialize conf->wmm_enabled based on iconf->ieee80211n in
hostapd_reload_bss() similarly to what is done in the initial startup
case in hostapd_setup_bss().

This fixes issues with RSN capabilities being set incorrectly when WMM
is supposed to get enabled and unexpectedly enabling WMM when it is not
supposed to be enabled (HT disabled). Either of these issues could show
up when asking hostapd to reload the configuration file (and when that
file does not set wmm_enabled explicitly).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/hostapd.c

index 12911dfd46116bd3d42d52bdef59d0eadc5e34f9..0b6db7bc28db2f73852fdf2c04da63bd4ed5a010 100644 (file)
@@ -82,6 +82,9 @@ static void hostapd_reload_bss(struct hostapd_data *hapd)
        if (!hapd->started)
                return;
 
+       if (hapd->conf->wmm_enabled < 0)
+               hapd->conf->wmm_enabled = hapd->iconf->ieee80211n;
+
 #ifndef CONFIG_NO_RADIUS
        radius_client_reconfig(hapd->radius, hapd->conf->radius);
 #endif /* CONFIG_NO_RADIUS */