public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC] mac80211: Don't encrypt beacons
  2008-05-05 16:41 [RFC] mac80211: Don't encrypt beacons Ivo van Doorn
@ 2008-05-05 16:36 ` Johannes Berg
  2008-05-05 18:36   ` Ivo van Doorn
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2008-05-05 16:36 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

Hi,

> This patch is intended to for your experimental patch:
> 	019-mac80211-tx-info-skb-cb.patch
> 
> Beacons shouldn't be encryped, so mac80211 should set
> the IEEE80211_TX_CTL_DO_NOT_ENCRYPT flag in tx info flags.
> Otherwise the driver will cause a NULL pointer dereference
> when it tries to access the info->control.hw_key which isn't
> configured.

Shouldn't this apply before that change as well? I'll happily roll it
into the skb->cb/txinfo patch, but it seems it should be there w/o that
too.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* [RFC] mac80211: Don't encrypt beacons
@ 2008-05-05 16:41 Ivo van Doorn
  2008-05-05 16:36 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Ivo van Doorn @ 2008-05-05 16:41 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Hi Johannes,

This patch is intended to for your experimental patch:
	019-mac80211-tx-info-skb-cb.patch

Beacons shouldn't be encryped, so mac80211 should set
the IEEE80211_TX_CTL_DO_NOT_ENCRYPT flag in tx info flags.
Otherwise the driver will cause a NULL pointer dereference
when it tries to access the info->control.hw_key which isn't
configured.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>

---
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index a359b9a..3b3592f 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1856,6 +1856,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
 		info->flags |= IEEE80211_TX_CTL_SHORT_PREAMBLE;
 	info->antenna_sel_tx = local->hw.conf.antenna_sel_tx;
 	info->flags |= IEEE80211_TX_CTL_NO_ACK;
+	info->flags |= IEEE80211_TX_CTL_DO_NOT_ENCRYPT;
 	info->control.retry_limit = 1;
 	info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 	(*num_beacons)++;

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

* Re: [RFC] mac80211: Don't encrypt beacons
  2008-05-05 18:36   ` Ivo van Doorn
@ 2008-05-05 18:33     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2008-05-05 18:33 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]


> Hmm, your absolutely right, I hadn't checked the wireless-testing code yet. :)
> I only noticed this bug since a user had hostapd running on rt2x00.git with
> rt61pci HW crypto enabled.

:)

> I'll respin the patch to apply for wireless-testing ;)

Send it to John, I'll port it over to tx-info when it arrives in my
tree.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [RFC] mac80211: Don't encrypt beacons
  2008-05-05 16:36 ` Johannes Berg
@ 2008-05-05 18:36   ` Ivo van Doorn
  2008-05-05 18:33     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Ivo van Doorn @ 2008-05-05 18:36 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Monday 05 May 2008, Johannes Berg wrote:
> Hi,
> 
> > This patch is intended to for your experimental patch:
> > 	019-mac80211-tx-info-skb-cb.patch
> > 
> > Beacons shouldn't be encryped, so mac80211 should set
> > the IEEE80211_TX_CTL_DO_NOT_ENCRYPT flag in tx info flags.
> > Otherwise the driver will cause a NULL pointer dereference
> > when it tries to access the info->control.hw_key which isn't
> > configured.
> 
> Shouldn't this apply before that change as well? I'll happily roll it
> into the skb->cb/txinfo patch, but it seems it should be there w/o that
> too.

Hmm, your absolutely right, I hadn't checked the wireless-testing code yet. :)
I only noticed this bug since a user had hostapd running on rt2x00.git with
rt61pci HW crypto enabled.
I'll respin the patch to apply for wireless-testing ;)

Ivo

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

end of thread, other threads:[~2008-05-05 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05 16:41 [RFC] mac80211: Don't encrypt beacons Ivo van Doorn
2008-05-05 16:36 ` Johannes Berg
2008-05-05 18:36   ` Ivo van Doorn
2008-05-05 18:33     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox