NAN: Process received NAN SDFs with NAN Network ID in A3 on AP
hostapd did not accept NAN SDFs that used NAN Network ID instead of Wildcard BSSID in A3. Extend this to process NAN Network ID just like Wildcard BSSID for these frames to allow the specific group address to be used. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
ccba6921de
commit
83f9dcbb35
4 changed files with 17 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
|||
#include "common/dpp.h"
|
||||
#include "common/sae.h"
|
||||
#include "common/hw_features_common.h"
|
||||
#include "common/nan_de.h"
|
||||
#include "crypto/random.h"
|
||||
#include "p2p/p2p.h"
|
||||
#include "wps/wps.h"
|
||||
|
@ -1855,6 +1856,11 @@ static struct hostapd_data * get_hapd_bssid(struct hostapd_iface *iface,
|
|||
if (bssid[0] == 0xff && bssid[1] == 0xff && bssid[2] == 0xff &&
|
||||
bssid[3] == 0xff && bssid[4] == 0xff && bssid[5] == 0xff)
|
||||
return HAPD_BROADCAST;
|
||||
#ifdef CONFIG_NAN_USD
|
||||
if (nan_de_is_nan_network_id(bssid))
|
||||
return HAPD_BROADCAST; /* Process NAN Network ID like broadcast
|
||||
*/
|
||||
#endif /* CONFIG_NAN_USD */
|
||||
|
||||
for (i = 0; i < iface->num_bss; i++) {
|
||||
struct hostapd_data *hapd;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "common/wpa_common.h"
|
||||
#include "common/wpa_ctrl.h"
|
||||
#include "common/ptksa_cache.h"
|
||||
#include "common/nan_de.h"
|
||||
#include "radius/radius.h"
|
||||
#include "radius/radius_client.h"
|
||||
#include "p2p/p2p.h"
|
||||
|
@ -6295,6 +6296,9 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
|||
}
|
||||
|
||||
if (!is_broadcast_ether_addr(mgmt->bssid) &&
|
||||
#ifdef CONFIG_NAN_USD
|
||||
!nan_de_is_nan_network_id(mgmt->bssid) &&
|
||||
#endif /* CONFIG_NAN_USD */
|
||||
#ifdef CONFIG_P2P
|
||||
/* Invitation responses can be sent with the peer MAC as BSSID */
|
||||
!((hapd->conf->p2p & P2P_GROUP_OWNER) &&
|
||||
|
|
|
@ -79,6 +79,12 @@ struct nan_de {
|
|||
};
|
||||
|
||||
|
||||
bool nan_de_is_nan_network_id(const u8 *addr)
|
||||
{
|
||||
return ether_addr_equal(addr, nan_network_id);
|
||||
}
|
||||
|
||||
|
||||
struct nan_de * nan_de_init(const u8 *nmi, bool offload, bool ap,
|
||||
const struct nan_callbacks *cb)
|
||||
{
|
||||
|
|
|
@ -59,6 +59,7 @@ struct nan_callbacks {
|
|||
unsigned int freq);
|
||||
};
|
||||
|
||||
bool nan_de_is_nan_network_id(const u8 *addr);
|
||||
struct nan_de * nan_de_init(const u8 *nmi, bool offload, bool ap,
|
||||
const struct nan_callbacks *cb);
|
||||
void nan_de_flush(struct nan_de *de);
|
||||
|
|
Loading…
Add table
Reference in a new issue