]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Guard against survey list not being initialized
authorBenjamin Berg <benjamin.berg@intel.com>
Fri, 21 Nov 2025 10:05:52 +0000 (11:05 +0100)
committerJouni Malinen <j@w1.fi>
Mon, 26 Jan 2026 17:24:26 +0000 (19:24 +0200)
Do not try to store survey information in the unusual event that the
channels survey_list is not initialized. That should not usually happen,
but could, e.g., be the case if the regulatory changes and new channels
are added after the ACS scan was started.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
src/ap/drv_callbacks.c

index 162ed9df9334210930b9e1022e8ba20f0313fd2e..d9bfcae09f8c82fc14e9cd5ae5781b738d1e0725 100644 (file)
@@ -2244,6 +2244,8 @@ void hostapd_event_get_survey(struct hostapd_iface *iface,
                        continue;
                if (chan->flag & HOSTAPD_CHAN_DISABLED)
                        continue;
+               if (!(chan->flag & HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED))
+                       continue;
 
                dl_list_del(&survey->list);
                dl_list_add_tail(&chan->survey_list, &survey->list);