1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-30 03:25:20 +02:00
openwrt-xburst/openwrt/package/arpwatch/patches/013_debian_opt_allsubnets

104 lines
2.4 KiB
Plaintext
Raw Normal View History

Index: arpwatch/arpwatch.8
diff -u arpwatch/arpwatch.8:1.1.1.1 arpwatch/arpwatch.8:1.1.1.1.8.1
--- arpwatch/arpwatch.8:1.1.1.1 Tue Apr 17 13:31:36 2001
+++ arpwatch/arpwatch.8 Tue Apr 17 13:51:23 2001
@@ -27,6 +27,8 @@
.na
.B arpwatch
[
+.B -a
+] [
.B -dN
] [
.B -f
@@ -53,6 +55,17 @@
uses
.BR pcap (3)
to listen for arp packets on a local ethernet interface.
+.LP
+.B -a
+By default,
+.B arpwatch
+reports bogons (unless
+.B -N
+is given) for IP addresses that are in the same subnet than the
+first IP address of the default interface. If this option is
+specified,
+.B arpwatch
+will report bogons about every IP addresses. (Debian specific)
.LP
The
.B -d
Index: arpwatch/arpwatch.c
diff -u arpwatch/arpwatch.c:1.1.1.1.2.1 arpwatch/arpwatch.c:1.1.1.1.2.1.6.1
--- arpwatch/arpwatch.c:1.1.1.1.2.1 Tue Apr 17 13:47:57 2001
+++ arpwatch/arpwatch.c Tue Apr 17 13:51:23 2001
@@ -154,6 +154,7 @@
struct bpf_program code;
char errbuf[PCAP_ERRBUF_SIZE];
char options[] =
+ "a"
"d"
"f:"
"i:"
@@ -181,6 +182,10 @@
while ((op = getopt(argc, argv, options)) != EOF)
switch (op) {
+ case 'a':
+ ++allsubnets;
+ break;
+
case 'd':
++debug;
#ifndef DEBUG
@@ -389,7 +394,7 @@
/* Watch for bogons */
if (isbogon(sia)) {
dosyslog(LOG_INFO, "bogon", sia, sea, sha);
- return;
+ if (!allsubnets) return;
}
/* Watch for ethernet broadcast */
@@ -538,7 +543,7 @@
/* Watch for bogons */
if (isbogon(sia)) {
dosyslog(LOG_INFO, "bogon", sia, sea, sha);
- return;
+ if (!allsubnets) return;
}
/* Watch for ethernet broadcast */
@@ -757,6 +762,7 @@
{
extern char version[];
char usage[] =
+ "[-a] "
"[-dN] "
"[-f datafile] "
"[-i interface] "
Index: arpwatch/util.c
diff -u arpwatch/util.c:1.1.1.1 arpwatch/util.c:1.1.1.1.8.1
--- arpwatch/util.c:1.1.1.1 Tue Apr 17 13:31:37 2001
+++ arpwatch/util.c Tue Apr 17 13:51:24 2001
@@ -59,6 +59,7 @@
u_char zero[6] = { 0, 0, 0, 0, 0, 0 };
u_char allones[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+int allsubnets = 0; /* watch all attached subnets */
int debug = 0;
int initializing = 1; /* true if initializing */
Index: arpwatch/util.h
diff -u arpwatch/util.h:1.1.1.1 arpwatch/util.h:1.1.1.1.8.1
--- arpwatch/util.h:1.1.1.1 Tue Apr 17 13:31:37 2001
+++ arpwatch/util.h Tue Apr 17 13:51:24 2001
@@ -15,5 +15,6 @@
extern u_char zero[6];
extern u_char allones[6];
+extern int allsubnets;
extern int debug;
extern int initializing;