During channel switch handling for AP MLD, if link ID is incorrect,
there is no point in proceeding till end and failing or returning from
there. Hence sanitize it in the initial time itself and return if it is
incorrect. Throw a warning print if it is not correct as well.
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
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 ?