From 92b6e0c582c60b1b61b8bc926792c30291a1f972 Mon Sep 17 00:00:00 2001 From: Ashok Ponnaiah Date: Mon, 29 Jan 2018 18:11:03 +0200 Subject: [PATCH] hostapd: Send broadcast Public Action frame with wildcard BSSID address 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 --- src/ap/ap_drv_ops.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index 8f4d83984..8beea3f2e 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c @@ -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);