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 <aponnaia@codeaurora.org>
This commit is contained in:
Ashok Ponnaiah 2018-01-29 18:11:03 +02:00 committed by Jouni Malinen
parent 35818d3e07
commit 92b6e0c582

View file

@ -736,6 +736,15 @@ int hostapd_drv_send_action(struct hostapd_data *hapd, unsigned int freq,
sta = ap_get_sta(hapd, dst); sta = ap_get_sta(hapd, dst);
if (!sta || !(sta->flags & WLAN_STA_ASSOC)) if (!sta || !(sta->flags & WLAN_STA_ASSOC))
bssid = wildcard_bssid; 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, return hapd->driver->send_action(hapd->drv_priv, freq, wait, dst,
hapd->own_addr, bssid, data, len, 0); hapd->own_addr, bssid, data, len, 0);