All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: enable assoc check for mesh interfaces
@ 2015-06-13 14:16 Bob Copeland
  2015-06-17  9:01 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Copeland @ 2015-06-13 14:16 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, Bob Copeland, stable

We already set a station to be associated when peering completes, both
in user space and in the kernel.  Thus we should always have an
associated sta before sending data frames to that station.

Failure to check assoc state can cause crashes in the lower-level driver
due to transmitting unicast data frames before driver sta structures
(e.g. ampdu state in ath9k) are initialized.  This occurred when
forwarding in the presence of fixed mesh paths: frames were transmitted
to stations with whom we hadn't yet completed peering.

Cc: stable@vger.kernel.org
Reported-by: Alexis Green <agreen@cococorp.com>
Tested-by: Jesse Jones <jjones@cococorp.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
 net/mac80211/tx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8410bb3..d580f86 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -311,9 +311,6 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
 	if (tx->sdata->vif.type == NL80211_IFTYPE_WDS)
 		return TX_CONTINUE;
 
-	if (tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
-		return TX_CONTINUE;
-
 	if (tx->flags & IEEE80211_TX_PS_BUFFERED)
 		return TX_CONTINUE;
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: enable assoc check for mesh interfaces
  2015-06-13 14:16 [PATCH] mac80211: enable assoc check for mesh interfaces Bob Copeland
@ 2015-06-17  9:01 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-06-17  9:01 UTC (permalink / raw)
  To: Bob Copeland; +Cc: linux-wireless, stable

On Sat, 2015-06-13 at 10:16 -0400, Bob Copeland wrote:
> We already set a station to be associated when peering completes, both
> in user space and in the kernel.  Thus we should always have an
> associated sta before sending data frames to that station.
> 
> Failure to check assoc state can cause crashes in the lower-level driver
> due to transmitting unicast data frames before driver sta structures
> (e.g. ampdu state in ath9k) are initialized.  This occurred when
> forwarding in the presence of fixed mesh paths: frames were transmitted
> to stations with whom we hadn't yet completed peering.

Applied.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-17  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-13 14:16 [PATCH] mac80211: enable assoc check for mesh interfaces Bob Copeland
2015-06-17  9:01 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.