diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index abe90e984..aadefc7b7 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -1303,6 +1303,14 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv, return; } + if (link && is_ap_interface(drv->nlmode) && + !nl80211_link_valid(bss->valid_links, data.ch_switch.link_id)) { + wpa_printf(MSG_WARNING, + "nl80211: Unknown link ID (%d) for channel switch (%s), ignoring", + data.ch_switch.link_id, bss->ifname); + return; + } + drv->assoc_freq = data.ch_switch.freq; wpa_supplicant_event(bss->ctx, finished ?