aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-08 06:32:08 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:06 -0500
commit97ebe12a035e11f8af7a06a34f4d848f9b2f0b49 (patch)
treed6c96bf228c0a3c7e2022541d01d08f4cc1a6864 /net/mac80211/rx.c
parent1acc97b63a3f32481ebbb4e831323e9aa8834f66 (diff)
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>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 63db89aef3e4..57ce697e3251 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1737,6 +1737,9 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
1737 if (!(rx->flags & IEEE80211_RX_RA_MATCH)) 1737 if (!(rx->flags & IEEE80211_RX_RA_MATCH))
1738 return RX_DROP_MONITOR; 1738 return RX_DROP_MONITOR;
1739 1739
1740 if (ieee80211_drop_unencrypted(rx, mgmt->frame_control))
1741 return RX_DROP_MONITOR;
1742
1740 /* all categories we currently handle have action_code */ 1743 /* all categories we currently handle have action_code */
1741 if (len < IEEE80211_MIN_ACTION_SIZE + 1) 1744 if (len < IEEE80211_MIN_ACTION_SIZE + 1)
1742 return RX_DROP_MONITOR; 1745 return RX_DROP_MONITOR;
@@ -1825,10 +1828,14 @@ static ieee80211_rx_result debug_noinline
1825ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx) 1828ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
1826{ 1829{
1827 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); 1830 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
1831 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
1828 1832
1829 if (!(rx->flags & IEEE80211_RX_RA_MATCH)) 1833 if (!(rx->flags & IEEE80211_RX_RA_MATCH))
1830 return RX_DROP_MONITOR; 1834 return RX_DROP_MONITOR;
1831 1835
1836 if (ieee80211_drop_unencrypted(rx, mgmt->frame_control))
1837 return RX_DROP_MONITOR;
1838
1832 if (ieee80211_vif_is_mesh(&sdata->vif)) 1839 if (ieee80211_vif_is_mesh(&sdata->vif))
1833 return ieee80211_mesh_rx_mgmt(sdata, rx->skb, rx->status); 1840 return ieee80211_mesh_rx_mgmt(sdata, rx->skb, rx->status);
1834 1841