Date: Sat, 27 Aug 2016 20:14:48 +0000 (UTC) From: Kurt Jaeger <pi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r420995 - in head/net-mgmt/arpwatch: . files Message-ID: <201608272014.u7RKEmk3014897@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pi Date: Sat Aug 27 20:14:48 2016 New Revision: 420995 URL: https://svnweb.freebsd.org/changeset/ports/420995 Log: 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 Modified: head/net-mgmt/arpwatch/Makefile head/net-mgmt/arpwatch/files/patch-arpwatch.8 head/net-mgmt/arpwatch/files/patch-arpwatch.c head/net-mgmt/arpwatch/files/patch-util.c head/net-mgmt/arpwatch/files/patch-util.h Modified: head/net-mgmt/arpwatch/Makefile ============================================================================== --- head/net-mgmt/arpwatch/Makefile Sat Aug 27 19:30:03 2016 (r420994) +++ head/net-mgmt/arpwatch/Makefile Sat Aug 27 20:14:48 2016 (r420995) @@ -3,7 +3,7 @@ PORTNAME= arpwatch DISTVERSION= 2.1a15 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.ee.lbl.gov/ \ GENTOO Modified: head/net-mgmt/arpwatch/files/patch-arpwatch.8 ============================================================================== --- head/net-mgmt/arpwatch/files/patch-arpwatch.8 Sat Aug 27 19:30:03 2016 (r420994) +++ head/net-mgmt/arpwatch/files/patch-arpwatch.8 Sat Aug 27 20:14:48 2016 (r420995) @@ -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 Modified: head/net-mgmt/arpwatch/files/patch-arpwatch.c ============================================================================== --- head/net-mgmt/arpwatch/files/patch-arpwatch.c Sat Aug 27 19:30:03 2016 (r420994) +++ head/net-mgmt/arpwatch/files/patch-arpwatch.c Sat Aug 27 20:14:48 2016 (r420995) @@ -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]" Modified: head/net-mgmt/arpwatch/files/patch-util.c ============================================================================== --- head/net-mgmt/arpwatch/files/patch-util.c Sat Aug 27 19:30:03 2016 (r420994) +++ head/net-mgmt/arpwatch/files/patch-util.c Sat Aug 27 20:14:48 2016 (r420995) @@ -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 */ Modified: head/net-mgmt/arpwatch/files/patch-util.h ============================================================================== --- head/net-mgmt/arpwatch/files/patch-util.h Sat Aug 27 19:30:03 2016 (r420994) +++ head/net-mgmt/arpwatch/files/patch-util.h Sat Aug 27 20:14:48 2016 (r420995) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608272014.u7RKEmk3014897>