]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Fix clearing up settings for color switch
authorStone Zhang <quic_stonez@quicinc.com>
Mon, 14 Oct 2024 10:47:32 +0000 (18:47 +0800)
committerJouni Malinen <j@w1.fi>
Mon, 28 Oct 2024 08:57:04 +0000 (10:57 +0200)
Settings for color switch (struct cca_settings settings)
is used without zero clearing, which causes the member
settings->ubpr->unsol_bcast_probe_resp_intervalettings
to be a random value. It is againsts the NLA policy of
NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT and causes
BSS color switch failure.

Fixes: 654d2395dddf ("BSS coloring: Handling of collision events and triggering CCA")
Signed-off-by: Stone Zhang <quic_stonez@quicinc.com>
src/ap/hostapd.c

index 5ba2cab2c0ba73942f103aa91edf61697320f7ed..90e93b6dcf7a4208c5a5f95393a79a34de360847 100644 (file)
@@ -4768,6 +4768,7 @@ static void hostapd_switch_color_timeout_handler(void *eloop_data,
                struct cca_settings settings;
                int ret;
 
+               os_memset(&settings, 0, sizeof(settings));
                hostapd_cleanup_cca_params(bss);
                bss->cca_color = r;
                bss->cca_count = 10;