338-mac80211-Fix-Public-Action-frame-RX-in-AP-mode.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From: Jouni Malinen <jouni@qca.qualcomm.com>
  2. Date: Tue, 1 Mar 2016 00:29:00 +0200
  3. Subject: [PATCH] mac80211: Fix Public Action frame RX in AP mode
  4. Public Action frames use special rules for how the BSSID field (Address
  5. 3) is set. A wildcard BSSID is used in cases where the transmitter and
  6. recipient are not members of the same BSS. As such, we need to accept
  7. Public Action frames with wildcard BSSID.
  8. Commit db8e17324553 ("mac80211: ignore frames between TDLS peers when
  9. operating as AP") added a rule that drops Action frames to TDLS-peers
  10. based on an Action frame having different DA (Address 1) and BSSID
  11. (Address 3) values. This is not correct since it misses the possibility
  12. of BSSID being a wildcard BSSID in which case the Address 1 would not
  13. necessarily match.
  14. Fix this by allowing mac80211 to accept wildcard BSSID in an Action
  15. frame when in AP mode.
  16. Fixes: db8e17324553 ("mac80211: ignore frames between TDLS peers when operating as AP")
  17. Cc: stable@vger.kernel.org
  18. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
  19. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  20. ---
  21. --- a/net/mac80211/rx.c
  22. +++ b/net/mac80211/rx.c
  23. @@ -3374,6 +3374,7 @@ static bool ieee80211_accept_frame(struc
  24. return false;
  25. /* ignore action frames to TDLS-peers */
  26. if (ieee80211_is_action(hdr->frame_control) &&
  27. + !is_broadcast_ether_addr(bssid) &&
  28. !ether_addr_equal(bssid, hdr->addr1))
  29. return false;
  30. }