]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MLD: Use AP MLD MAC address with deauthenticate
authorIlan Peer <ilan.peer@intel.com>
Mon, 8 Apr 2024 13:06:59 +0000 (16:06 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 21 Apr 2024 08:55:53 +0000 (11:55 +0300)
When the authentication is an MLD authentication need to use the AP MLD
MAC address when requesting the driver to deauthenticate.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
wpa_supplicant/wpa_supplicant.c

index ab71e2f2736b798d0805deb022b2b21617daa3fb..eeb6675157d245816ebc4dade984f9c099fc0b28 100644 (file)
@@ -4583,14 +4583,18 @@ void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
        int zero_addr = 0;
 
        wpa_dbg(wpa_s, MSG_DEBUG, "Request to deauthenticate - bssid=" MACSTR
-               " pending_bssid=" MACSTR " reason=%d (%s) state=%s",
+               " pending_bssid=" MACSTR
+               " reason=%d (%s) state=%s valid_links=0x%x ap_mld_addr=" MACSTR,
                MAC2STR(wpa_s->bssid), MAC2STR(wpa_s->pending_bssid),
                reason_code, reason2str(reason_code),
-               wpa_supplicant_state_txt(wpa_s->wpa_state));
-
-       if (!is_zero_ether_addr(wpa_s->pending_bssid) &&
-           (wpa_s->wpa_state == WPA_AUTHENTICATING ||
-            wpa_s->wpa_state == WPA_ASSOCIATING))
+               wpa_supplicant_state_txt(wpa_s->wpa_state), wpa_s->valid_links,
+               MAC2STR(wpa_s->ap_mld_addr));
+
+       if (wpa_s->valid_links && !is_zero_ether_addr(wpa_s->ap_mld_addr))
+               addr = wpa_s->ap_mld_addr;
+       else if (!is_zero_ether_addr(wpa_s->pending_bssid) &&
+                (wpa_s->wpa_state == WPA_AUTHENTICATING ||
+                 wpa_s->wpa_state == WPA_ASSOCIATING))
                addr = wpa_s->pending_bssid;
        else if (!is_zero_ether_addr(wpa_s->bssid))
                addr = wpa_s->bssid;