aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-27 09:38:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 11:47:49 -0400
commit1dc1e5ad5a05da69c51446f9c8a2c097884fece7 (patch)
tree5e80cad2b1d9445a160af924f8fd0c54cbdfaa1f
parentd2b32167957d2cb234636bac6dd46056c17bc272 (diff)
mac80211: correct behaviour on unrecognised action frames
commit 4b5ebccc40843104d980f0714bc86bfcd5568941 upstream. When receiving an "individually addressed" action frame, the receiver is required to return it to the sender. mac80211 gets this wrong as it also returns group addressed (mcast) frames to the sender. Fix this and update the reference to the new 802.11 standards version since things were shuffled around significantly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/mac80211/rx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 41000650f4a..667f5590576 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2291,7 +2291,7 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
2291 * frames that we didn't handle, including returning unknown 2291 * frames that we didn't handle, including returning unknown
2292 * ones. For all other modes we will return them to the sender, 2292 * ones. For all other modes we will return them to the sender,
2293 * setting the 0x80 bit in the action category, as required by 2293 * setting the 0x80 bit in the action category, as required by
2294 * 802.11-2007 7.3.1.11. 2294 * 802.11-2012 9.24.4.
2295 * Newer versions of hostapd shall also use the management frame 2295 * Newer versions of hostapd shall also use the management frame
2296 * registration mechanisms, but older ones still use cooked 2296 * registration mechanisms, but older ones still use cooked
2297 * monitor interfaces so push all frames there. 2297 * monitor interfaces so push all frames there.
@@ -2301,6 +2301,9 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
2301 sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) 2301 sdata->vif.type == NL80211_IFTYPE_AP_VLAN))
2302 return RX_DROP_MONITOR; 2302 return RX_DROP_MONITOR;
2303 2303
2304 if (is_multicast_ether_addr(mgmt->da))
2305 return RX_DROP_MONITOR;
2306
2304 /* do not return rejected action frames */ 2307 /* do not return rejected action frames */
2305 if (mgmt->u.action.category & 0x80) 2308 if (mgmt->u.action.category & 0x80)
2306 return RX_DROP_UNUSABLE; 2309 return RX_DROP_UNUSABLE;