mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
Three more fixes:
- don't drop all unprotected public action frames since some don't have a protected dual - fix pointer confusion in scanning code - fix warning in some connections with multiple links -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEpeA8sTs3M8SN2hR410qiO8sPaAAFAmU3naIACgkQ10qiO8sP aADUNA//clFAsaH6A94tD6Hgyafi9idBpsHERkYE4RaGmiID34yOYDInvkoDmsy1 WG7wEdNjnsYDBrX0eG1x7WSrQRLhs76U0HnBP9tFYIeygnLuul2/UNRFkK6EwQfn OJbVJdjQdL/c8p129DUr5JKhavbc4ovY2acECLRY54n1fAYlnn6u7SWsOyCu0zl7 wXSQ5pzYHu5lFM5LSFj6mC7U8b/aFQ5r9XsNHwGz4YVvd5cEdLYc/y5bAK6xAIxz jJcJLV088QikAcYmgIS7MNQuKrMudNjCEDWtqM23N9pO//QjsbOag2q02JmfxWyv 4YJy42G/0K0/wjwCpIZig2OOE5iKDKCJ+dvNBUaCnnTn1ARQSXSDgAYkmWReCrZu DUpvn8Be3fgULtaUC0QQ3R1oCTVJyKYTD55Ofcy3Pj1qt+1lmhgLp1qyezemJcfJ p2sv5GLwyPLcOUTjeqTgP57xoJl2JV9vUVey9xvk2dMl0vS5qpfIf3FR7R0+HtlZ UIrveQOLMsKAaamk59RaSpfg4vJoCqaabu97f/lHRc5WdaeURSlUw0rU9xdqc/P+ GTX7ubKoMiMEx11v25JdTE3eniFGxu28cojqScryvFo6WIlkYp4cbNxtRb4i9rOX ZJXQWCE6YJZ90VlR/a8lpJnTXjntQT5vBtH7vhqAneN2TJN74h8= =AvmQ -----END PGP SIGNATURE----- Merge tag 'wireless-2023-10-24' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Three more fixes: - don't drop all unprotected public action frames since some don't have a protected dual - fix pointer confusion in scanning code - fix warning in some connections with multiple links * tag 'wireless-2023-10-24' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: don't drop all unprotected public action frames wifi: cfg80211: fix assoc response warning on failed links wifi: cfg80211: pass correct pointer to rdev_inform_bss() ==================== Link: https://lore.kernel.org/r/20231024103540.19198-2-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
00d67093e4
@ -4355,6 +4355,35 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,
|
||||
return mgmt->u.action.category == WLAN_CATEGORY_PUBLIC;
|
||||
}
|
||||
|
||||
/**
|
||||
* ieee80211_is_protected_dual_of_public_action - check if skb contains a
|
||||
* protected dual of public action management frame
|
||||
* @skb: the skb containing the frame, length will be checked
|
||||
*
|
||||
* Return: true if the skb contains a protected dual of public action
|
||||
* management frame, false otherwise.
|
||||
*/
|
||||
static inline bool
|
||||
ieee80211_is_protected_dual_of_public_action(struct sk_buff *skb)
|
||||
{
|
||||
u8 action;
|
||||
|
||||
if (!ieee80211_is_public_action((void *)skb->data, skb->len) ||
|
||||
skb->len < IEEE80211_MIN_ACTION_SIZE + 1)
|
||||
return false;
|
||||
|
||||
action = *(u8 *)(skb->data + IEEE80211_MIN_ACTION_SIZE);
|
||||
|
||||
return action != WLAN_PUB_ACTION_20_40_BSS_COEX &&
|
||||
action != WLAN_PUB_ACTION_DSE_REG_LOC_ANN &&
|
||||
action != WLAN_PUB_ACTION_MSMT_PILOT &&
|
||||
action != WLAN_PUB_ACTION_TDLS_DISCOVER_RES &&
|
||||
action != WLAN_PUB_ACTION_LOC_TRACK_NOTI &&
|
||||
action != WLAN_PUB_ACTION_FTM_REQUEST &&
|
||||
action != WLAN_PUB_ACTION_FTM_RESPONSE &&
|
||||
action != WLAN_PUB_ACTION_FILS_DISCOVERY;
|
||||
}
|
||||
|
||||
/**
|
||||
* _ieee80211_is_group_privacy_action - check if frame is a group addressed
|
||||
* privacy action frame
|
||||
|
@ -2468,8 +2468,7 @@ static int ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
|
||||
|
||||
/* drop unicast public action frames when using MPF */
|
||||
if (is_unicast_ether_addr(mgmt->da) &&
|
||||
ieee80211_is_public_action((void *)rx->skb->data,
|
||||
rx->skb->len))
|
||||
ieee80211_is_protected_dual_of_public_action(rx->skb))
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
|
@ -43,10 +43,11 @@ void cfg80211_rx_assoc_resp(struct net_device *dev,
|
||||
|
||||
for (link_id = 0; link_id < ARRAY_SIZE(data->links); link_id++) {
|
||||
cr.links[link_id].status = data->links[link_id].status;
|
||||
cr.links[link_id].bss = data->links[link_id].bss;
|
||||
|
||||
WARN_ON_ONCE(cr.links[link_id].status != WLAN_STATUS_SUCCESS &&
|
||||
(!cr.ap_mld_addr || !cr.links[link_id].bss));
|
||||
|
||||
cr.links[link_id].bss = data->links[link_id].bss;
|
||||
if (!cr.links[link_id].bss)
|
||||
continue;
|
||||
cr.links[link_id].bssid = data->links[link_id].bss->bssid;
|
||||
|
@ -2125,7 +2125,7 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,
|
||||
if (!res)
|
||||
goto drop;
|
||||
|
||||
rdev_inform_bss(rdev, &res->pub, ies, data->drv_data);
|
||||
rdev_inform_bss(rdev, &res->pub, ies, drv_data->drv_data);
|
||||
|
||||
if (data->bss_source == BSS_SOURCE_MBSSID) {
|
||||
/* this is a nontransmitting bss, we need to add it to
|
||||
|
Loading…
Reference in New Issue
Block a user