From 5f30f62eead712afb6de939abb9869fe107b8d2b Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Thu, 9 Feb 2023 00:25:30 -0800 Subject: [PATCH] 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 --- src/rsn_supp/tdls.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); -- 2.47.2