Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: mac80211: Accept management frames on NAN interface

Accept Public Action frames and Authentication frames on
NAN Device interface to support flows that require these frames:

- SDFs: For user space Discovery Engine (DE) implementation.
- NAFs: For user space NAN Data Path (NDP) establishment.
- Authentication frames: For NAN Pairing and Verification.

Accept only frames from devices that are part of the NAN
cluster.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250908140015.46528d69e881.Ifccd87fb2a49a3af05238f74f52fa6da8de28811@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Ilan Peer and committed by
Johannes Berg
488d2e0b fc41f4a2

+10 -2
+10 -2
net/mac80211/rx.c
··· 4502 4502 (ieee80211_is_auth(hdr->frame_control) && 4503 4503 ether_addr_equal(sdata->vif.addr, hdr->addr1)); 4504 4504 case NL80211_IFTYPE_NAN: 4505 - /* Currently no frames on NAN interface are allowed */ 4506 - return false; 4505 + /* Accept only frames that are addressed to the NAN cluster 4506 + * (based on the Cluster ID). From these frames, accept only 4507 + * action frames or authentication frames that are addressed to 4508 + * the local NAN interface. 4509 + */ 4510 + return memcmp(sdata->wdev.u.nan.cluster_id, 4511 + hdr->addr3, ETH_ALEN) == 0 && 4512 + (ieee80211_is_public_action(hdr, skb->len) || 4513 + (ieee80211_is_auth(hdr->frame_control) && 4514 + ether_addr_equal(sdata->vif.addr, hdr->addr1))); 4507 4515 default: 4508 4516 break; 4509 4517 }