mac80211: fix injection in monitor mode
authorPavel Roskin <proski@gnu.org>
Fri, 10 Jul 2009 20:42:29 +0000 (16:42 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 21 Jul 2009 16:07:38 +0000 (12:07 -0400)
The location of the 802.11 header is calculated incorrectly due to a
wrong placement of parentheses.  Found by kmemcheck.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/tx.c

index d238a89..3a8922c 100644 (file)
@@ -1455,7 +1455,7 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
                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 */