diff options
author | Arik Nemtsov <arik@wizery.com> | 2014-07-17 10:14:30 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-07-21 06:14:05 -0400 |
commit | db8e173245535e7e91603e3e69bc63722a82ed81 (patch) | |
tree | 2a5a44281e096c179075155d489153a3b1c99f16 /net/mac80211/rx.c | |
parent | c72e1140463a643579c3f9e09f990e71e95671ac (diff) |
mac80211: ignore frames between TDLS peers when operating as AP
If the AP receives actions frames destined for other peers, it may
mistakenly toggle BA-sessions from itself to a peer.
Ignore TDLS data packets as well - the AP should not handle them.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5f572bed1761..5a786d489f7e 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -3129,6 +3129,14 @@ static bool prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
3129 | if (!ieee80211_is_beacon(hdr->frame_control)) | 3129 | if (!ieee80211_is_beacon(hdr->frame_control)) |
3130 | return false; | 3130 | return false; |
3131 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; | 3131 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; |
3132 | } else if (!ieee80211_has_tods(hdr->frame_control)) { | ||
3133 | /* ignore data frames to TDLS-peers */ | ||
3134 | if (ieee80211_is_data(hdr->frame_control)) | ||
3135 | return false; | ||
3136 | /* ignore action frames to TDLS-peers */ | ||
3137 | if (ieee80211_is_action(hdr->frame_control) && | ||
3138 | !ether_addr_equal(bssid, hdr->addr1)) | ||
3139 | return false; | ||
3132 | } | 3140 | } |
3133 | break; | 3141 | break; |
3134 | case NL80211_IFTYPE_WDS: | 3142 | case NL80211_IFTYPE_WDS: |