File: ieee80211_inject-2.6.22.patch

package info (click to toggle)
aircrack-ng 1%3A1.6%2Bgit20210130.91820bc-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 19,056 kB
  • sloc: ansic: 67,045; cs: 5,392; sh: 3,773; python: 2,565; pascal: 1,074; asm: 570; makefile: 253; cpp: 46
file content (26 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- linux-2.6.23_orig/net/ieee80211/ieee80211_tx.c	2007-10-09 22:31:38.000000000 +0200
+++ linux-2.6.23/net/ieee80211/ieee80211_tx.c	2007-10-14 19:39:49.000000000 +0200
@@ -293,6 +293,23 @@
 
 	ether_type = ntohs(((struct ethhdr *)skb->data)->h_proto);
 
+	if(ieee->iw_mode == IW_MODE_MONITOR)
+	{
+		txb = ieee80211_alloc_txb(1, skb->len,
+					ieee->tx_headroom, GFP_ATOMIC);
+		if (unlikely(!txb)) {
+			printk(KERN_WARNING "%s: Could not allocate TXB\n",
+			ieee->dev->name);
+			goto failed;
+		}
+
+		txb->encrypted = 0;
+		txb->payload_size = skb->len;
+		skb_copy_from_linear_data(skb, skb_put(txb->fragments[0],skb->len), skb->len);
+
+		goto success;
+	}
+
 	crypt = ieee->crypt[ieee->tx_keyidx];
 
 	encrypt = !(ether_type == ETH_P_PAE && ieee->ieee802_1x) &&