TDLS: Reply to Discovery Request on the link with matching BSSID

When the current association is with an AP MLD, the Discovery Response
needs to be sent using the link that matches the indicated BSSID.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
This commit is contained in:
Kiran Kumar Lokere 2023-02-09 00:25:30 -08:00 committed by Jouni Malinen
parent 626501434b
commit 5f30f62eea

View file

@ -1623,10 +1623,11 @@ wpa_tdls_process_discovery_request(struct wpa_sm *sm, const u8 *addr,
lnkid = (const struct wpa_tdls_lnkid *) kde.lnkid;
if (os_memcmp(sm->bssid, lnkid->bssid, ETH_ALEN) != 0) {
wpa_printf(MSG_DEBUG, "TDLS: Discovery Request from different "
" BSS " MACSTR, MAC2STR(lnkid->bssid));
return -1;
if (!wpa_tdls_is_lnkid_bss_valid(sm, lnkid, &link_id)) {
wpa_printf(MSG_DEBUG,
"TDLS: Discovery Request from different BSS "
MACSTR, MAC2STR(lnkid->bssid));
return -1;
}
peer = wpa_tdls_add_peer(sm, addr, NULL);