]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Handle Management frame TX status for AP MLD address
authorIlan Peer <ilan.peer@intel.com>
Mon, 22 May 2023 19:33:52 +0000 (22:33 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 12 Jun 2023 13:26:56 +0000 (16:26 +0300)
This allows proper TX status handling when MLD addressing is used for
Management frames. Note, that the statuses are still not forwarded to
the correct link BSS. This will be handled in later commits.

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

index 0cd8ce744892ff4ada2019ddbdb01a9ab55abf4f..7d15ceaab39570de188cf654012a6ab07b68872b 100644 (file)
@@ -1538,12 +1538,22 @@ static void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, const u8 *buf,
                               size_t len, u16 stype, int ok)
 {
        struct ieee80211_hdr *hdr;
-       struct hostapd_data *orig_hapd = hapd;
+       struct hostapd_data *orig_hapd = hapd, *tmp_hapd;
 
        hdr = (struct ieee80211_hdr *) buf;
-       hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len));
-       if (!hapd)
+       tmp_hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len));
+       if (tmp_hapd) {
+               hapd = tmp_hapd;
+#ifdef CONFIG_IEEE80211BE
+       } else if (hapd->conf->mld_ap &&
+                  os_memcmp(hapd->mld_addr, get_hdr_bssid(hdr, len),
+                            ETH_ALEN) == 0) {
+               /* AP MLD address match - use hapd pointer as-is */
+#endif /* CONFIG_IEEE80211BE */
+       } else {
                return;
+       }
+
        if (hapd == HAPD_BROADCAST) {
                if (stype != WLAN_FC_STYPE_ACTION || len <= 25 ||
                    buf[24] != WLAN_ACTION_PUBLIC)