From eb699ef78742dae4956a20a5d42a7a55ae084f46 Mon Sep 17 00:00:00 2001 From: Art Manion Date: Sat, 23 Feb 2019 19:02:11 -0500 Subject: [PATCH 1/5] Make -d and -v actually work, modify pfSense UI --- net-mgmt/arpwatch/Makefile | 2 +- net-mgmt/arpwatch/files/patch-Makefile.in | 17 ++++------------- net-mgmt/arpwatch/files/patch-arpwatch.c | 18 +++++++++--------- net-mgmt/pfSense-pkg-arpwatch/Makefile | 2 +- .../files/usr/local/pkg/arpwatch.inc | 3 ++- .../files/usr/local/pkg/arpwatch.xml | 6 ++++++ 6 files changed, 23 insertions(+), 25 deletions(-) diff --git a/net-mgmt/arpwatch/Makefile b/net-mgmt/arpwatch/Makefile index 2ff70978e05e..7c15ca616f5c 100644 --- a/net-mgmt/arpwatch/Makefile +++ b/net-mgmt/arpwatch/Makefile @@ -3,7 +3,7 @@ PORTNAME= arpwatch DISTVERSION= 2.1a15 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.ee.lbl.gov/ \ GENTOO diff --git a/net-mgmt/arpwatch/files/patch-Makefile.in b/net-mgmt/arpwatch/files/patch-Makefile.in index 642d61eccff8..53dfaf842ab0 100644 --- a/net-mgmt/arpwatch/files/patch-Makefile.in +++ b/net-mgmt/arpwatch/files/patch-Makefile.in @@ -1,6 +1,6 @@ ---- Makefile.in.orig 2000-06-15 00:39:55 UTC -+++ Makefile.in -@@ -31,7 +31,7 @@ BINDEST = @sbindir@ +--- Makefile.in.orig 2019-02-06 23:18:11.306011000 -0500 ++++ Makefile.in 2019-02-08 21:48:15.165348200 -0500 +@@ -31,7 +31,7 @@ # Pathname of directory to install the man page MANDEST = @mandir@ # Pathname of directory to install database file @@ -9,16 +9,7 @@ # VPATH srcdir = @srcdir@ -@@ -45,7 +45,7 @@ CC = @CC@ - PROG = arpwatch - CCOPT = @V_CCOPT@ - INCLS = -I. @V_INCLS@ --DEFS = -DDEBUG @DEFS@ -DARPDIR=\"$(ARPDIR)\" -DPATH_SENDMAIL=\"$(SENDMAIL)\" -+DEFS = @DEFS@ -DARPDIR=\"$(ARPDIR)\" -DPATH_SENDMAIL=\"$(SENDMAIL)\" - - # Standard CFLAGS - CFLAGS = $(CCOPT) $(DEFS) $(INCLS) -@@ -110,13 +110,13 @@ zap: zap.o intoa.o +@@ -110,13 +110,13 @@ $(CC) $(CFLAGS) -o $@ zap.o intoa.o -lutil install: force diff --git a/net-mgmt/arpwatch/files/patch-arpwatch.c b/net-mgmt/arpwatch/files/patch-arpwatch.c index 99599e318aa9..bd83d0dbf51c 100644 --- a/net-mgmt/arpwatch/files/patch-arpwatch.c +++ b/net-mgmt/arpwatch/files/patch-arpwatch.c @@ -1,6 +1,6 @@ ---- arpwatch.c.orig 2004-01-22 22:18:20 UTC -+++ arpwatch.c -@@ -107,6 +107,8 @@ struct rtentry; +--- arpwatch.c.orig 2019-02-06 23:18:28.123873500 -0500 ++++ arpwatch.c 2019-02-12 10:27:47.850346300 -0500 +@@ -107,6 +107,8 @@ char *prog; @@ -9,16 +9,16 @@ int can_checkpoint; int swapped; int nobogons; -@@ -170,7 +172,7 @@ main(int argc, char **argv) +@@ -170,7 +172,7 @@ interface = NULL; rfilename = NULL; pd = NULL; - while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF) -+ while ((op = getopt(argc, argv, "dzf:i:m:n:Nr:")) != EOF) ++ while ((op = getopt(argc, argv, "dvzf:i:m:n:Nr:")) != EOF) switch (op) { case 'd': -@@ -202,6 +204,16 @@ main(int argc, char **argv) +@@ -202,6 +204,16 @@ rfilename = optarg; break; @@ -35,7 +35,7 @@ default: usage(); } -@@ -321,7 +333,6 @@ main(int argc, char **argv) +@@ -321,7 +333,6 @@ (void)setsignal(SIGINT, die); (void)setsignal(SIGTERM, die); @@ -43,7 +43,7 @@ if (rfilename == NULL) { (void)setsignal(SIGQUIT, checkpoint); (void)setsignal(SIGALRM, checkpoint); -@@ -391,6 +402,12 @@ process_ether(register u_char *u, regist +@@ -391,6 +402,12 @@ return; } @@ -56,7 +56,7 @@ /* Double check ethernet addresses */ if (MEMCMP(sea, sha, 6) != 0) { dosyslog(LOG_INFO, "ethernet mismatch", sia, sea, sha); -@@ -751,6 +768,6 @@ usage(void) +@@ -751,6 +768,6 @@ (void)fprintf(stderr, "Version %s\n", version); (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]" diff --git a/net-mgmt/pfSense-pkg-arpwatch/Makefile b/net-mgmt/pfSense-pkg-arpwatch/Makefile index b64ed649c782..61cea128199b 100644 --- a/net-mgmt/pfSense-pkg-arpwatch/Makefile +++ b/net-mgmt/pfSense-pkg-arpwatch/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= pfSense-pkg-arpwatch -PORTVERSION= 0.1.1 +PORTVERSION= 0.1.2 CATEGORIES= net-mgmt MASTER_SITES= # empty DISTFILES= # empty diff --git a/net-mgmt/pfSense-pkg-arpwatch/files/usr/local/pkg/arpwatch.inc b/net-mgmt/pfSense-pkg-arpwatch/files/usr/local/pkg/arpwatch.inc index 8401d11eb21c..4bd5453bf8c6 100644 --- a/net-mgmt/pfSense-pkg-arpwatch/files/usr/local/pkg/arpwatch.inc +++ b/net-mgmt/pfSense-pkg-arpwatch/files/usr/local/pkg/arpwatch.inc @@ -32,6 +32,7 @@ function arpwatch_install_command() { $arpwatch_config = $config['installedpackages']['arpwatch']['config'][0]; $active_interfaces = $arpwatch_config['active_interfaces']; $notifications_recipient = $arpwatch_config['notifications_recipient']; + $disable_carp = ($arpwatch_config['disable_carp'] == 'on') ? '-v' : ''; $disable_bogons = ($arpwatch_config['disable_bogons'] == 'on') ? '-N' : ''; $disable_zero = ($arpwatch_config['disable_zero'] == 'on') ? '-z' : ''; $update_vendors = ($arpwatch_config['update_vendors'] == 'on'); @@ -60,7 +61,7 @@ function arpwatch_install_command() { touch($arp_file); - $rc['start'] .= "/usr/local/sbin/arpwatch $disable_bogons $disable_zero -f $arp_file -i $ifname -m $notifications_recipient"."\n"; + $rc['start'] .= "/usr/local/sbin/arpwatch $disable_carp $disable_bogons $disable_zero -f $arp_file -i $ifname -m $notifications_recipient"."\n"; } } diff --git a/net-mgmt/pfSense-pkg-arpwatch/files/usr/local/pkg/arpwatch.xml b/net-mgmt/pfSense-pkg-arpwatch/files/usr/local/pkg/arpwatch.xml index 7b1e7ab37fff..c1222634db13 100644 --- a/net-mgmt/pfSense-pkg-arpwatch/files/usr/local/pkg/arpwatch.xml +++ b/net-mgmt/pfSense-pkg-arpwatch/files/usr/local/pkg/arpwatch.xml @@ -80,6 +80,12 @@ 50 + + Disable CARP/VRRP + disable_carp + checkbox + Disables reporting CARP/VRRP ethernet prefixes. + Disable bogons disable_bogons From 11a26625255d96a7aeaff9c76647bd9dfe5135f3 Mon Sep 17 00:00:00 2001 From: zmanion Date: Sun, 2 Jun 2019 22:34:49 -0400 Subject: [PATCH 2/5] Reverting upstream arpwatch changes --- net-mgmt/arpwatch/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net-mgmt/arpwatch/Makefile b/net-mgmt/arpwatch/Makefile index 7c15ca616f5c..2ff70978e05e 100644 --- a/net-mgmt/arpwatch/Makefile +++ b/net-mgmt/arpwatch/Makefile @@ -3,7 +3,7 @@ PORTNAME= arpwatch DISTVERSION= 2.1a15 -PORTREVISION= 11 +PORTREVISION= 10 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.ee.lbl.gov/ \ GENTOO From 9964f16f6033302d90df6e273e8f6bdb23d2ce7e Mon Sep 17 00:00:00 2001 From: zmanion Date: Sun, 2 Jun 2019 22:37:42 -0400 Subject: [PATCH 3/5] Revert changes to upstream arpwatch --- net-mgmt/arpwatch/files/patch-Makefile.in | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/net-mgmt/arpwatch/files/patch-Makefile.in b/net-mgmt/arpwatch/files/patch-Makefile.in index 53dfaf842ab0..642d61eccff8 100644 --- a/net-mgmt/arpwatch/files/patch-Makefile.in +++ b/net-mgmt/arpwatch/files/patch-Makefile.in @@ -1,6 +1,6 @@ ---- Makefile.in.orig 2019-02-06 23:18:11.306011000 -0500 -+++ Makefile.in 2019-02-08 21:48:15.165348200 -0500 -@@ -31,7 +31,7 @@ +--- Makefile.in.orig 2000-06-15 00:39:55 UTC ++++ Makefile.in +@@ -31,7 +31,7 @@ BINDEST = @sbindir@ # Pathname of directory to install the man page MANDEST = @mandir@ # Pathname of directory to install database file @@ -9,7 +9,16 @@ # VPATH srcdir = @srcdir@ -@@ -110,13 +110,13 @@ +@@ -45,7 +45,7 @@ CC = @CC@ + PROG = arpwatch + CCOPT = @V_CCOPT@ + INCLS = -I. @V_INCLS@ +-DEFS = -DDEBUG @DEFS@ -DARPDIR=\"$(ARPDIR)\" -DPATH_SENDMAIL=\"$(SENDMAIL)\" ++DEFS = @DEFS@ -DARPDIR=\"$(ARPDIR)\" -DPATH_SENDMAIL=\"$(SENDMAIL)\" + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(DEFS) $(INCLS) +@@ -110,13 +110,13 @@ zap: zap.o intoa.o $(CC) $(CFLAGS) -o $@ zap.o intoa.o -lutil install: force From c2f7b39586c8428a720ff52dc3c270bc07446c4e Mon Sep 17 00:00:00 2001 From: zmanion Date: Sun, 2 Jun 2019 22:38:43 -0400 Subject: [PATCH 4/5] Revert to upstream arpwatch --- net-mgmt/arpwatch/files/patch-arpwatch.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/net-mgmt/arpwatch/files/patch-arpwatch.c b/net-mgmt/arpwatch/files/patch-arpwatch.c index bd83d0dbf51c..427ed5554b4d 100644 --- a/net-mgmt/arpwatch/files/patch-arpwatch.c +++ b/net-mgmt/arpwatch/files/patch-arpwatch.c @@ -1,6 +1,6 @@ ---- arpwatch.c.orig 2019-02-06 23:18:28.123873500 -0500 -+++ arpwatch.c 2019-02-12 10:27:47.850346300 -0500 -@@ -107,6 +107,8 @@ +--- arpwatch.c.orig 2004-01-22 22:18:20 UTC ++++ arpwatch.c +@@ -107,6 +107,8 @@ struct rtentry; char *prog; @@ -9,7 +9,7 @@ int can_checkpoint; int swapped; int nobogons; -@@ -170,7 +172,7 @@ +@@ -170,7 +172,7 @@ main(int argc, char **argv) interface = NULL; rfilename = NULL; pd = NULL; @@ -18,7 +18,7 @@ switch (op) { case 'd': -@@ -202,6 +204,16 @@ +@@ -202,6 +204,16 @@ main(int argc, char **argv) rfilename = optarg; break; @@ -35,7 +35,7 @@ default: usage(); } -@@ -321,7 +333,6 @@ +@@ -321,7 +333,6 @@ main(int argc, char **argv) (void)setsignal(SIGINT, die); (void)setsignal(SIGTERM, die); @@ -43,7 +43,7 @@ if (rfilename == NULL) { (void)setsignal(SIGQUIT, checkpoint); (void)setsignal(SIGALRM, checkpoint); -@@ -391,6 +402,12 @@ +@@ -391,6 +402,12 @@ process_ether(register u_char *u, regist return; } @@ -56,7 +56,7 @@ /* Double check ethernet addresses */ if (MEMCMP(sea, sha, 6) != 0) { dosyslog(LOG_INFO, "ethernet mismatch", sia, sea, sha); -@@ -751,6 +768,6 @@ +@@ -751,6 +768,6 @@ usage(void) (void)fprintf(stderr, "Version %s\n", version); (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]" From 8240f3e36110f9277bb617f230f1046237e954b9 Mon Sep 17 00:00:00 2001 From: zmanion Date: Sun, 2 Jun 2019 22:39:37 -0400 Subject: [PATCH 5/5] Update patch-arpwatch.c --- net-mgmt/arpwatch/files/patch-arpwatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net-mgmt/arpwatch/files/patch-arpwatch.c b/net-mgmt/arpwatch/files/patch-arpwatch.c index 427ed5554b4d..99599e318aa9 100644 --- a/net-mgmt/arpwatch/files/patch-arpwatch.c +++ b/net-mgmt/arpwatch/files/patch-arpwatch.c @@ -14,7 +14,7 @@ rfilename = NULL; pd = NULL; - while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF) -+ while ((op = getopt(argc, argv, "dvzf:i:m:n:Nr:")) != EOF) ++ while ((op = getopt(argc, argv, "dzf:i:m:n:Nr:")) != EOF) switch (op) { case 'd':