Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db8e1732 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Johannes Berg
Browse files

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: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c72e1140
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3129,6 +3129,14 @@ static bool prepare_for_handlers(struct ieee80211_rx_data *rx,
			if (!ieee80211_is_beacon(hdr->frame_control))
				return false;
			status->rx_flags &= ~IEEE80211_RX_RA_MATCH;
		} else if (!ieee80211_has_tods(hdr->frame_control)) {
			/* ignore data frames to TDLS-peers */
			if (ieee80211_is_data(hdr->frame_control))
				return false;
			/* ignore action frames to TDLS-peers */
			if (ieee80211_is_action(hdr->frame_control) &&
			    !ether_addr_equal(bssid, hdr->addr1))
				return false;
		}
		break;
	case NL80211_IFTYPE_WDS: