View | Details | Raw Unified | Return to bug 202548 | Differences between
and this patch

Collapse All | Expand All

(-)../../home/pi/myp/net-mgmt/arpwatch/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	arpwatch
4
PORTNAME=	arpwatch
5
DISTVERSION=	2.1a15
5
DISTVERSION=	2.1a15
6
PORTREVISION=	9
6
PORTREVISION=	10
7
CATEGORIES=	net-mgmt
7
CATEGORIES=	net-mgmt
8
MASTER_SITES=	ftp://ftp.ee.lbl.gov/ \
8
MASTER_SITES=	ftp://ftp.ee.lbl.gov/ \
9
		GENTOO
9
		GENTOO
(-)../../home/pi/myp/net-mgmt/arpwatch/files/patch-arpwatch.8 (-3 / +8 lines)
Lines 5-11 Link Here
5
 .B arpwatch
5
 .B arpwatch
6
 [
6
 [
7
-.B -dN
7
-.B -dN
8
+.B -dNz
8
+.B -dNvz
9
 ] [
9
 ] [
10
 .B -f
10
 .B -f
11
 .I datafile
11
 .I datafile
Lines 32-41 Link Here
32
 .B -n
32
 .B -n
33
 flag specifies additional local networks. This can be useful to
33
 flag specifies additional local networks. This can be useful to
34
 avoid "bogon" warnings when there is more than one network running
34
 avoid "bogon" warnings when there is more than one network running
35
@@ -83,6 +92,10 @@ The
35
@@ -83,6 +92,15 @@ The
36
 flag disables reporting any bogons.
36
 flag disables reporting any bogons.
37
 .LP
37
 .LP
38
 The
38
 The
39
+.B -v
40
+flag disables reporting on VRRP/CARP ethernet prefixes as described
41
+in RFC5798 (00:00:5e:00:01:xx),
42
+.LP
43
+The
39
+.B -z
44
+.B -z
40
+flag disables reporting 0.0.0.0 changes, helpful in busy DHCP networks.
45
+flag disables reporting 0.0.0.0 changes, helpful in busy DHCP networks.
41
+.LP
46
+.LP
Lines 43-49 Link Here
43
 .B -r
48
 .B -r
44
 flag is used to specify a savefile
49
 flag is used to specify a savefile
45
 (perhaps created by
50
 (perhaps created by
46
@@ -152,7 +165,7 @@ addresses was a DECnet address.
51
@@ -152,7 +170,7 @@ addresses was a DECnet address.
47
 .na
52
 .na
48
 .nh
53
 .nh
49
 .nf
54
 .nf
(-)../../home/pi/myp/net-mgmt/arpwatch/files/patch-arpwatch.c (-3 / +19 lines)
Lines 18-30 Link Here
18
 		switch (op) {
18
 		switch (op) {
19
 
19
 
20
 		case 'd':
20
 		case 'd':
21
@@ -202,6 +204,13 @@ main(int argc, char **argv)
21
@@ -202,6 +204,16 @@ main(int argc, char **argv)
22
 			rfilename = optarg;
22
 			rfilename = optarg;
23
 			break;
23
 			break;
24
 
24
 
25
+		case 'm':
25
+		case 'm':
26
+			Watcher = optarg;
26
+			Watcher = optarg;
27
+			break;
27
+			break;
28
+		case 'v':
29
+			vrrpflag = 1;
30
+			break;
28
+		case 'z':
31
+		case 'z':
29
+			zeroflag = 1;
32
+			zeroflag = 1;
30
+			break;
33
+			break;
Lines 32-38 Link Here
32
 		default:
35
 		default:
33
 			usage();
36
 			usage();
34
 		}
37
 		}
35
@@ -321,7 +330,6 @@ main(int argc, char **argv)
38
@@ -321,7 +333,6 @@ main(int argc, char **argv)
36
 
39
 
37
 	(void)setsignal(SIGINT, die);
40
 	(void)setsignal(SIGINT, die);
38
 	(void)setsignal(SIGTERM, die);
41
 	(void)setsignal(SIGTERM, die);
Lines 40-46 Link Here
40
 	if (rfilename == NULL) {
43
 	if (rfilename == NULL) {
41
 		(void)setsignal(SIGQUIT, checkpoint);
44
 		(void)setsignal(SIGQUIT, checkpoint);
42
 		(void)setsignal(SIGALRM, checkpoint);
45
 		(void)setsignal(SIGALRM, checkpoint);
43
@@ -751,6 +759,6 @@ usage(void)
46
@@ -391,6 +402,12 @@ process_ether(register u_char *u, regist
47
 		return;
48
 	}
49
 
50
+	/* Check for CARP-generated ARP replies and ignore them */
51
+	if (vrrpflag == 1 && MEMCMP(sha, vrrp_prefix, 5) == 0) {
52
+		/* do nothing */
53
+		return;
54
+	}
55
+
56
 	/* Double check ethernet addresses */
57
 	if (MEMCMP(sea, sha, 6) != 0) {
58
 		dosyslog(LOG_INFO, "ethernet mismatch", sia, sea, sha);
59
@@ -751,6 +768,6 @@ usage(void)
44
 
60
 
45
 	(void)fprintf(stderr, "Version %s\n", version);
61
 	(void)fprintf(stderr, "Version %s\n", version);
46
 	(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
62
 	(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
(-)../../home/pi/myp/net-mgmt/arpwatch/files/patch-util.c (-1 / +6 lines)
Lines 1-9 Link Here
1
--- util.c.orig	2004-01-22 22:25:39 UTC
1
--- util.c.orig	2004-01-22 22:25:39 UTC
2
+++ util.c
2
+++ util.c
3
@@ -60,6 +60,7 @@ u_char zero[6] = { 0, 0, 0, 0, 0, 0 };
3
@@ -59,7 +59,12 @@ char *ethercodes = ETHERCODES;
4
 u_char zero[6] = { 0, 0, 0, 0, 0, 0 };
4
 u_char allones[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
5
 u_char allones[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
5
 
6
 
7
+/* VRRP/CARP ethernet prefix */
8
+u_char vrrp_prefix[5] = { 0x00, 0x00, 0x5e, 0x00, 0x01 };
9
+
6
 int debug = 0;
10
 int debug = 0;
11
+int vrrpflag = 0;
7
+int zeroflag = 0;
12
+int zeroflag = 0;
8
 int initializing = 1;			/* true if initializing */
13
 int initializing = 1;			/* true if initializing */
9
 
14
 
(-)../../home/pi/myp/net-mgmt/arpwatch/files/patch-util.h (-1 / +5 lines)
Lines 1-8 Link Here
1
--- util.h.orig	1996-10-06 10:22:14 UTC
1
--- util.h.orig	1996-10-06 10:22:14 UTC
2
+++ util.h
2
+++ util.h
3
@@ -16,4 +16,5 @@ extern u_char zero[6];
3
@@ -14,6 +14,9 @@ extern char *ethercodes;
4
 
5
 extern u_char zero[6];
4
 extern u_char allones[6];
6
 extern u_char allones[6];
7
+extern u_char vrrp_prefix[5];
5
 
8
 
6
 extern int debug;
9
 extern int debug;
10
+extern int vrrpflag;
7
+extern int zeroflag;
11
+extern int zeroflag;
8
 extern int initializing;
12
 extern int initializing;

Return to bug 202548