Skip to contentSkip to conversation

mac80211: fix injection in monitor mode

PATCH New Pavel Roskin 1 participant 1 message Jul 10, 2009 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fix injection in monitor mode

The location of the 802.11 header is calculated incorrectly due to a wrong placement of parentheses. Found by kmemcheck.

---
 net/mac80211/tx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/tx.c +1 -1
index 969a4b2..b7e981c 100644
@@ -1407,7 +1407,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
 		monitor_iface = UNKNOWN_ADDRESS;
 
 		len_rthdr = ieee80211_get_radiotap_len(skb->data);
-		hdr = (struct ieee80211_hdr *)skb->data + len_rthdr;
+		hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
 		hdrlen = ieee80211_hdrlen(hdr->frame_control);
 
 		/* check the header is complete in the frame */