From: Jouni Malinen Date: Fri, 6 Apr 2018 20:29:11 +0000 (+0300) Subject: Fix hostapd wmm_enabled setup on config reload path X-Git-Tag: hostap_2_7~452 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d6eb9f2e2563d9e9fc709a5e9b577b61c0344b4;p=thirdparty%2Fhostap.git Fix hostapd wmm_enabled setup on config reload path 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 --- diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 12911dfd4..0b6db7bc2 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -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 */