From: Kiran Kumar Lokere Date: Thu, 9 Feb 2023 08:25:30 +0000 (-0800) Subject: TDLS: Reply to Discovery Request on the link with matching BSSID X-Git-Tag: hostap_2_11~983 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f30f62eead712afb6de939abb9869fe107b8d2b;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index 5f7607b46..10b517778 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -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);