]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Send broadcast Public Action frame with wildcard BSSID address
authorAshok Ponnaiah <aponnaia@codeaurora.org>
Mon, 29 Jan 2018 16:11:03 +0000 (18:11 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 29 Jan 2018 16:11:03 +0000 (18:11 +0200)
Send Public Action frames with wildcard BSSID when destination was
broadcast address. This is required for DPP PKEX where the recipients
may drop the frames received with different BSSID than the wildcard
address or the current BSSID.

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
src/ap/ap_drv_ops.c

index 8f4d83984ef08e9301b72067a093ab3ca78c573d..8beea3f2e4681425f2efac9902e3a971753915af 100644 (file)
@@ -736,6 +736,15 @@ int hostapd_drv_send_action(struct hostapd_data *hapd, unsigned int freq,
                sta = ap_get_sta(hapd, dst);
                if (!sta || !(sta->flags & WLAN_STA_ASSOC))
                        bssid = wildcard_bssid;
+       } else if (is_broadcast_ether_addr(dst) &&
+                  len > 0 && data[0] == WLAN_ACTION_PUBLIC) {
+               /*
+                * The only current use case of Public Action frames with
+                * broadcast destination address is DPP PKEX. That case is
+                * directing all devices and not just the STAs within the BSS,
+                * so have to use the wildcard BSSID value.
+                */
+               bssid = wildcard_bssid;
        }
        return hapd->driver->send_action(hapd->drv_priv, freq, wait, dst,
                                         hapd->own_addr, bssid, data, len, 0);