File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -4355,6 +4355,35 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,
4355
4355
return mgmt -> u .action .category == WLAN_CATEGORY_PUBLIC ;
4356
4356
}
4357
4357
4358
+ /**
4359
+ * ieee80211_is_protected_dual_of_public_action - check if skb contains a
4360
+ * protected dual of public action management frame
4361
+ * @skb: the skb containing the frame, length will be checked
4362
+ *
4363
+ * Return: true if the skb contains a protected dual of public action
4364
+ * management frame, false otherwise.
4365
+ */
4366
+ static inline bool
4367
+ ieee80211_is_protected_dual_of_public_action (struct sk_buff * skb )
4368
+ {
4369
+ u8 action ;
4370
+
4371
+ if (!ieee80211_is_public_action ((void * )skb -> data , skb -> len ) ||
4372
+ skb -> len < IEEE80211_MIN_ACTION_SIZE + 1 )
4373
+ return false;
4374
+
4375
+ action = * (u8 * )(skb -> data + IEEE80211_MIN_ACTION_SIZE );
4376
+
4377
+ return action != WLAN_PUB_ACTION_20_40_BSS_COEX &&
4378
+ action != WLAN_PUB_ACTION_DSE_REG_LOC_ANN &&
4379
+ action != WLAN_PUB_ACTION_MSMT_PILOT &&
4380
+ action != WLAN_PUB_ACTION_TDLS_DISCOVER_RES &&
4381
+ action != WLAN_PUB_ACTION_LOC_TRACK_NOTI &&
4382
+ action != WLAN_PUB_ACTION_FTM_REQUEST &&
4383
+ action != WLAN_PUB_ACTION_FTM_RESPONSE &&
4384
+ action != WLAN_PUB_ACTION_FILS_DISCOVERY ;
4385
+ }
4386
+
4358
4387
/**
4359
4388
* _ieee80211_is_group_privacy_action - check if frame is a group addressed
4360
4389
* privacy action frame
Original file line number Diff line number Diff line change @@ -2468,8 +2468,7 @@ static int ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
2468
2468
2469
2469
/* drop unicast public action frames when using MPF */
2470
2470
if (is_unicast_ether_addr (mgmt -> da ) &&
2471
- ieee80211_is_public_action ((void * )rx -> skb -> data ,
2472
- rx -> skb -> len ))
2471
+ ieee80211_is_protected_dual_of_public_action (rx -> skb ))
2473
2472
return - EACCES ;
2474
2473
}
2475
2474
You can’t perform that action at this time.
0 commit comments