/[packages]/obsolete/cauldron/aircrack-ng/current/SOURCES/aircrack-ng-1.1-ignore-channel-1-error.patch
ViewVC logotype

Contents of /obsolete/cauldron/aircrack-ng/current/SOURCES/aircrack-ng-1.1-ignore-channel-1-error.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 389213 - (show annotations) (download)
Thu Jan 17 21:29:26 2013 UTC (8 years, 8 months ago) by pterjan
File size: 1923 byte(s)
Drop 
1 diff -Naur --exclude '*~' --exclude '*.orig' --exclude '*.rej' aircrack-ng-1.1/src/aireplay-ng.c aircrack-ng-1.1-ignore-channel-1-error/src/aireplay-ng.c
2 --- aircrack-ng-1.1/src/aireplay-ng.c 2010-04-02 06:33:28.000000000 +0200
3 +++ aircrack-ng-1.1-ignore-channel-1-error/src/aireplay-ng.c 2011-12-30 16:37:07.636926177 +0100
4 @@ -200,7 +200,9 @@
5 "\n"
6 " Miscellaneous options:\n"
7 "\n"
8 -" -R : disable /dev/rtc usage\n"
9 +" -R : disable /dev/rtc usage\n"
10 +" --ignore-negative-one : if the interface's channel can't be determined,\n"
11 +" ignore the mismatch, needed for unpatched cfg80211\n"
12 "\n"
13 " Attack modes (numbers can still be used):\n"
14 "\n"
15 @@ -268,6 +270,7 @@
16 int bittest;
17
18 int nodetect;
19 + int ignore_negative_one;
20 int rtc;
21 }
22 opt;
23 @@ -715,6 +718,13 @@
24
25 iface_chan = wi_get_channel(wi);
26
27 + if(iface_chan == -1 && !opt.ignore_negative_one)
28 + {
29 + PCT; printf("Couldn't determine current channel for %s, you should either force the operation with --ignore-negative-one or apply a kernel patch\n",
30 + wi_get_ifname(wi));
31 + return -1;
32 + }
33 +
34 if(bssid != NULL)
35 {
36 ap_chan = wait_for_beacon(bssid, capa, essid);
37 @@ -723,7 +733,7 @@
38 PCT; printf("No such BSSID available.\n");
39 return -1;
40 }
41 - if(ap_chan != iface_chan)
42 + if((ap_chan != iface_chan) && (iface_chan != -1 || !opt.ignore_negative_one))
43 {
44 PCT; printf("%s is on channel %d, but the AP uses channel %d\n", wi_get_ifname(wi), iface_chan, ap_chan);
45 return -1;
46 @@ -5765,6 +5775,7 @@
47 {"help", 0, 0, 'H'},
48 {"fast", 0, 0, 'F'},
49 {"bittest", 0, 0, 'B'},
50 + {"ignore-negative-one", 0, &opt.ignore_negative_one, 1},
51 {0, 0, 0, 0 }
52 };
53

  ViewVC Help
Powered by ViewVC 1.1.28