]> git.ipfire.org Git - thirdparty/hostap.git/commit
Update iface->current_mode when fetching new hw_features
authorNijun Gong <quic_ngong@quicinc.com>
Tue, 11 Jul 2023 13:21:21 +0000 (21:21 +0800)
committerJouni Malinen <j@w1.fi>
Tue, 22 Aug 2023 17:56:49 +0000 (20:56 +0300)
commit1085e3bdc6f666647a605caf6ae55e65f7f0d47e
tree3f8ee56fbb607707b3fc5d729429958ebdf77a95
parent07d3c1177bbb44fbcc3fe12cf1e8bfa50aa5fd19
Update iface->current_mode when fetching new hw_features

When a CHANNEL_LIST_CHANGED event is received, memory of
iface->hw_features is freed and allocated again with
hostapd_get_hw_features(), but iface->current_mode still refer to the
original memory address, which is not correct since that memory has been
freed. This could happen in cases where the driver provides channel list
updates during the lifetime of the started BSS.

Fix this by updated iface->current_mode to point to the new array of hw
features.

Fixes: 0837863fbc62 ("AP: Handle 6 GHz AP state machine with NO_IR flags")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/hw_features.c