Previously, the action frames to group address was not encrypted. But
[1] "Table 8-38 Category values" indicates "Mesh" and "Multihop" category
action frames should be encrypted (Group addressed privacy == yes). And the
encyption key should be MGTK ([1] 10.13 Group addressed robust management frame
procedures). So this patch modifies the code to make it suitable for spec.
[1] IEEE Std 802.11-2012
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
return mgmt->u.action.category == WLAN_CATEGORY_PUBLIC;
}
return mgmt->u.action.category == WLAN_CATEGORY_PUBLIC;
}
+static inline bool is_multicast_ether_addr(const u8 *a)
+{
+ return 0x01 & a[0];
+}
+
/**
* _ieee80211_is_group_privacy_action - check if frame is a group addressed
* privacy action frame
* @hdr: the frame
*/
/**
* _ieee80211_is_group_privacy_action - check if frame is a group addressed
* privacy action frame
* @hdr: the frame
*/
-static inline bool _ieee80211_is_group_privacy_action(struct ieee80211_hdr *hdr)
+static inline bool ieee80211_is_group_privacy_action(struct ieee80211_hdr *hdr)
{
struct ieee80211_mgmt *mgmt = (void *)hdr;
{
struct ieee80211_mgmt *mgmt = (void *)hdr;
mgmt->u.action.category == WLAN_CATEGORY_MULTIHOP_ACTION;
}
mgmt->u.action.category == WLAN_CATEGORY_MULTIHOP_ACTION;
}
-/**
- * ieee80211_is_group_privacy_action - check if frame is a group addressed
- * privacy action frame
- * @skb: the skb containing the frame, length will be checked
- */
-static inline bool ieee80211_is_group_privacy_action(struct sk_buff *skb)
-{
- if (skb->len < IEEE80211_MIN_ACTION_SIZE)
- return false;
- return _ieee80211_is_group_privacy_action((void *)skb->data);
-}
-
/**
* ieee80211_tu_to_usec - convert time units (TU) to microseconds
* @tu: the TUs
/**
* ieee80211_tu_to_usec - convert time units (TU) to microseconds
* @tu: the TUs