]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TDLS: Reply to Discovery Request on the link with matching BSSID
authorKiran Kumar Lokere <quic_klokere@quicinc.com>
Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)
committerJouni Malinen <j@w1.fi>
Fri, 8 Sep 2023 10:20:31 +0000 (13:20 +0300)
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>
src/rsn_supp/tdls.c

index 5f7607b46fac11f9c9db4beabf611d8bbf4c31ca..10b517778cce88f581074f950c2454873fe8a43a 100644 (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);