mac80211: 802.11w - Drop unprotected robust management frames if MFP is used
Use ieee80211_drop_unencrypted() to decide whether a received frame should be dropped with management frames, too. If MFP is negotiated, unprotected robust management frames will be dropped. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
1acc97b63a
commit
97ebe12a03
1 changed files with 7 additions and 0 deletions
|
@ -1737,6 +1737,9 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
|
||||||
if (!(rx->flags & IEEE80211_RX_RA_MATCH))
|
if (!(rx->flags & IEEE80211_RX_RA_MATCH))
|
||||||
return RX_DROP_MONITOR;
|
return RX_DROP_MONITOR;
|
||||||
|
|
||||||
|
if (ieee80211_drop_unencrypted(rx, mgmt->frame_control))
|
||||||
|
return RX_DROP_MONITOR;
|
||||||
|
|
||||||
/* all categories we currently handle have action_code */
|
/* all categories we currently handle have action_code */
|
||||||
if (len < IEEE80211_MIN_ACTION_SIZE + 1)
|
if (len < IEEE80211_MIN_ACTION_SIZE + 1)
|
||||||
return RX_DROP_MONITOR;
|
return RX_DROP_MONITOR;
|
||||||
|
@ -1825,10 +1828,14 @@ static ieee80211_rx_result debug_noinline
|
||||||
ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
|
ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
|
||||||
{
|
{
|
||||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
|
||||||
|
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
|
||||||
|
|
||||||
if (!(rx->flags & IEEE80211_RX_RA_MATCH))
|
if (!(rx->flags & IEEE80211_RX_RA_MATCH))
|
||||||
return RX_DROP_MONITOR;
|
return RX_DROP_MONITOR;
|
||||||
|
|
||||||
|
if (ieee80211_drop_unencrypted(rx, mgmt->frame_control))
|
||||||
|
return RX_DROP_MONITOR;
|
||||||
|
|
||||||
if (ieee80211_vif_is_mesh(&sdata->vif))
|
if (ieee80211_vif_is_mesh(&sdata->vif))
|
||||||
return ieee80211_mesh_rx_mgmt(sdata, rx->skb, rx->status);
|
return ieee80211_mesh_rx_mgmt(sdata, rx->skb, rx->status);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue