Skip to contentSkip to conversation

mac80211: Don't encrypt beacons

RFC In review Ivo van Doorn 2 participants 4 messages May 5, 2008 mac80211

lore
Share & tools
lore
#0 lore raw

RFC 1/1 mac80211: Don't encrypt beacons

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.

---

net/mac80211/tx.c +1 -0
index a359b9a..3b3592f 100644
@@ -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)++;
maintainer
#1 lore raw

Hi,

Quoted 8 lines

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

#2 lore raw
Quoted 11 lines · Johannes Berg

Hi,

Quoted 8 lines

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.

Quoted 3 lines

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

maintainer
#3 lore raw
Quoted 4 lines

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.

:)

Quoted 1 line

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