aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/arpwatch
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2016-08-28 04:14:48 +0800
committerpi <pi@FreeBSD.org>2016-08-28 04:14:48 +0800
commite308177274ededc304dead5eaf9cdfc49d1890ab (patch)
tree60804adf41c43b9296d7dc01d8267653d09cdf0b /net-mgmt/arpwatch
parent7640f0eff15a073fcbd8ed8cbbc05fb37e6b277a (diff)
downloadfreebsd-ports-gnome-e308177274ededc304dead5eaf9cdfc49d1890ab.tar.gz
freebsd-ports-gnome-e308177274ededc304dead5eaf9cdfc49d1890ab.tar.zst
freebsd-ports-gnome-e308177274ededc304dead5eaf9cdfc49d1890ab.zip
net-mgmt/arpwatch: add flag -v to ignore VRRP/CARP traffic
- The -v flag disables reporting on VRRP/CARP ethernet prefixes as described in RFC5798 (00:00:5e:00:01:xx) PR: 202548 Submitted by: paul@dokas.name
Diffstat (limited to 'net-mgmt/arpwatch')
-rw-r--r--net-mgmt/arpwatch/Makefile2
-rw-r--r--net-mgmt/arpwatch/files/patch-arpwatch.811
-rw-r--r--net-mgmt/arpwatch/files/patch-arpwatch.c22
-rw-r--r--net-mgmt/arpwatch/files/patch-util.c7
-rw-r--r--net-mgmt/arpwatch/files/patch-util.h6
5 files changed, 39 insertions, 9 deletions
diff --git a/net-mgmt/arpwatch/Makefile b/net-mgmt/arpwatch/Makefile
index a630e20fe443..2ff70978e05e 100644
--- a/net-mgmt/arpwatch/Makefile
+++ b/net-mgmt/arpwatch/Makefile
@@ -3,7 +3,7 @@
PORTNAME= arpwatch
DISTVERSION= 2.1a15
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= net-mgmt
MASTER_SITES= ftp://ftp.ee.lbl.gov/ \
GENTOO
diff --git a/net-mgmt/arpwatch/files/patch-arpwatch.8 b/net-mgmt/arpwatch/files/patch-arpwatch.8
index 4f1a21a5ca8d..e2dfbf082ce0 100644
--- a/net-mgmt/arpwatch/files/patch-arpwatch.8
+++ b/net-mgmt/arpwatch/files/patch-arpwatch.8
@@ -5,7 +5,7 @@
.B arpwatch
[
-.B -dN
-+.B -dNz
++.B -dNvz
] [
.B -f
.I datafile
@@ -32,10 +32,15 @@
.B -n
flag specifies additional local networks. This can be useful to
avoid "bogon" warnings when there is more than one network running
-@@ -83,6 +92,10 @@ The
+@@ -83,6 +92,15 @@ The
flag disables reporting any bogons.
.LP
The
++.B -v
++flag disables reporting on VRRP/CARP ethernet prefixes as described
++in RFC5798 (00:00:5e:00:01:xx).
++.LP
++The
+.B -z
+flag disables reporting 0.0.0.0 changes, helpful in busy DHCP networks.
+.LP
@@ -43,7 +48,7 @@
.B -r
flag is used to specify a savefile
(perhaps created by
-@@ -152,7 +165,7 @@ addresses was a DECnet address.
+@@ -152,7 +170,7 @@ addresses was a DECnet address.
.na
.nh
.nf
diff --git a/net-mgmt/arpwatch/files/patch-arpwatch.c b/net-mgmt/arpwatch/files/patch-arpwatch.c
index 9d1e3c1db0a2..99599e318aa9 100644
--- a/net-mgmt/arpwatch/files/patch-arpwatch.c
+++ b/net-mgmt/arpwatch/files/patch-arpwatch.c
@@ -18,13 +18,16 @@
switch (op) {
case 'd':
-@@ -202,6 +204,13 @@ main(int argc, char **argv)
+@@ -202,6 +204,16 @@ main(int argc, char **argv)
rfilename = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
++ case 'v':
++ vrrpflag = 1;
++ break;
+ case 'z':
+ zeroflag = 1;
+ break;
@@ -32,7 +35,7 @@
default:
usage();
}
-@@ -321,7 +330,6 @@ main(int argc, char **argv)
+@@ -321,7 +333,6 @@ main(int argc, char **argv)
(void)setsignal(SIGINT, die);
(void)setsignal(SIGTERM, die);
@@ -40,7 +43,20 @@
if (rfilename == NULL) {
(void)setsignal(SIGQUIT, checkpoint);
(void)setsignal(SIGALRM, checkpoint);
-@@ -751,6 +759,6 @@ usage(void)
+@@ -391,6 +402,12 @@ process_ether(register u_char *u, regist
+ return;
+ }
+
++ /* Check for CARP-generated ARP replies and ignore them */
++ if (vrrpflag == 1 && MEMCMP(sha, vrrp_prefix, 5) == 0) {
++ /* do nothing */
++ return;
++ }
++
+ /* Double check ethernet addresses */
+ if (MEMCMP(sea, sha, 6) != 0) {
+ dosyslog(LOG_INFO, "ethernet mismatch", sia, sea, sha);
+@@ -751,6 +768,6 @@ usage(void)
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
diff --git a/net-mgmt/arpwatch/files/patch-util.c b/net-mgmt/arpwatch/files/patch-util.c
index 24a46e363179..88071da8b4df 100644
--- a/net-mgmt/arpwatch/files/patch-util.c
+++ b/net-mgmt/arpwatch/files/patch-util.c
@@ -1,9 +1,14 @@
--- util.c.orig 2004-01-22 22:25:39 UTC
+++ util.c
-@@ -60,6 +60,7 @@ u_char zero[6] = { 0, 0, 0, 0, 0, 0 };
+@@ -59,7 +59,12 @@ char *ethercodes = ETHERCODES;
+ u_char zero[6] = { 0, 0, 0, 0, 0, 0 };
u_char allones[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
++/* VRRP/CARP ethernet prefix */
++u_char vrrp_prefix[5] = { 0x00, 0x00, 0x5e, 0x00, 0x01 };
++
int debug = 0;
++int vrrpflag = 0;
+int zeroflag = 0;
int initializing = 1; /* true if initializing */
diff --git a/net-mgmt/arpwatch/files/patch-util.h b/net-mgmt/arpwatch/files/patch-util.h
index a2acc88abf37..4aafd0327270 100644
--- a/net-mgmt/arpwatch/files/patch-util.h
+++ b/net-mgmt/arpwatch/files/patch-util.h
@@ -1,8 +1,12 @@
--- util.h.orig 1996-10-06 10:22:14 UTC
+++ util.h
-@@ -16,4 +16,5 @@ extern u_char zero[6];
+@@ -14,6 +14,9 @@ extern char *ethercodes;
+
+ extern u_char zero[6];
extern u_char allones[6];
++extern u_char vrrp_prefix[5];
extern int debug;
++extern int vrrpflag;
+extern int zeroflag;
extern int initializing;