aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/arpwatch
diff options
context:
space:
mode:
authorCraig Leres <leres@FreeBSD.org>2019-12-15 18:49:27 +0000
committerCraig Leres <leres@FreeBSD.org>2019-12-15 18:49:27 +0000
commitf3786cd894e6328e1652c5fedd9ba4c81d05d7be (patch)
tree628e9bfce41bd5e944b803d74283fa3d11427a5b /net-mgmt/arpwatch
parent21c5c5d184c3e91e4475bb5b9db687a79e95201c (diff)
downloadports-f3786cd894e6328e1652c5fedd9ba4c81d05d7be.tar.gz
ports-f3786cd894e6328e1652c5fedd9ba4c81d05d7be.zip
net-mgmt/arpwatch: Update to 3.0. Update MASTER_SITES. Add options
for DEBUG (build with debugging support), ETHERCODES (install ethercodes.dat optionally), and ZEROPAD (zero pad displayed ethernet addresses by default). Take maintainership as per pi@ in the PR. Notable changes since 2.1a15: - Add -Z (zero pad) and -C (compact) flags to arpwatch and arpsnmp to allow run time selection of zero padded or compact ethernet addresses in arp.dat. - Check for I/O errors when writing new arp.dat file. - Add a FreeBSD rc.d startup script. - Escape unprintable hostnames in arp.dat to avoid corruption. - Added the -x flag which is like -n but excludes cidrs. Code contributed by Roman Ivanov (awant13@gmail.com). - Incorporated other fixes and patches with a lot of help from Kurt Jaeger (pi@FreeBSD.org). - Speed up arp.dat parsing by increasing the size of the hash table. - Control watcher/watchee from the command line (-w/W flags). PR: 242346 Approved by: pi (maintainer), ler (mentor, implicit)
Notes
Notes: svn path=/head/; revision=520189
Diffstat (limited to 'net-mgmt/arpwatch')
-rw-r--r--net-mgmt/arpwatch/Makefile52
-rw-r--r--net-mgmt/arpwatch/distinfo5
-rw-r--r--net-mgmt/arpwatch/files/patch-Makefile.in38
-rw-r--r--net-mgmt/arpwatch/files/patch-arpsnmp.834
-rw-r--r--net-mgmt/arpwatch/files/patch-arpsnmp.c43
-rw-r--r--net-mgmt/arpwatch/files/patch-arpwatch.859
-rw-r--r--net-mgmt/arpwatch/files/patch-arpwatch.c70
-rw-r--r--net-mgmt/arpwatch/files/patch-configure20
-rw-r--r--net-mgmt/arpwatch/files/patch-db.c20
-rw-r--r--net-mgmt/arpwatch/files/patch-dns.c33
-rw-r--r--net-mgmt/arpwatch/files/patch-report.c76
-rw-r--r--net-mgmt/arpwatch/files/patch-util.c15
-rw-r--r--net-mgmt/arpwatch/files/patch-util.h12
-rw-r--r--net-mgmt/arpwatch/files/pkg-message.in16
-rw-r--r--net-mgmt/arpwatch/pkg-descr2
-rw-r--r--net-mgmt/arpwatch/pkg-plist1
16 files changed, 81 insertions, 415 deletions
diff --git a/net-mgmt/arpwatch/Makefile b/net-mgmt/arpwatch/Makefile
index 2ff70978e05e..cbd86a5ddf77 100644
--- a/net-mgmt/arpwatch/Makefile
+++ b/net-mgmt/arpwatch/Makefile
@@ -2,23 +2,41 @@
# $FreeBSD$
PORTNAME= arpwatch
-DISTVERSION= 2.1a15
-PORTREVISION= 10
+PORTVERSION= 3.0
CATEGORIES= net-mgmt
-MASTER_SITES= ftp://ftp.ee.lbl.gov/ \
- GENTOO
+MASTER_SITES= https://ee.lbl.gov/downloads/arpwatch/ \
+ LOCAL/leres/arpwatch
-MAINTAINER= pi@FreeBSD.org
+MAINTAINER= leres@FreeBSD.org
COMMENT= Monitor arp & rarp requests
LICENSE= BSD3CLAUSE
+BUILD_DEPENDS= ${LOCALBASE}/include/pcap.h:net/libpcap
+RUN_DEPENDS= ${LOCALBASE}/include/pcap.h:net/libpcap
+
+USES= python:run
+
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --quiet
-INSTALL_TARGET= install install-man
-SUB_FILES= pkg-message
-USE_RC_SUBR= arpwatch
+SUB_FILES= pkg-message
+
+OPTIONS_DEFINE= DEBUG ETHERCODES ZEROPAD
+OPTIONS_DEFAULT=ETHERCODES ZEROPAD
+OPTIONS_SUB= yes
+
+ETHERCODES_DESC=install ethercodes.dat
+ZEROPAD_DESC= zero pad displayed ethernet addresses by default
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDEBUG}
+CONFIGURE_ARGS+= --disable-optimization
+.endif
+
+.if ${PORT_OPTIONS:MZEROPAD}
+CONFIGURE_ARGS+= --enable-zeropad
+.endif
.ifdef ARPDIR
MAKE_ARGS= ARPDIR=${ARPDIR}
@@ -26,10 +44,18 @@ MAKE_ARGS= ARPDIR=${ARPDIR}
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/arpwatch
- for files in ethercodes.dat d.awk duplicates.awk euppertolower.awk e.awk p.awk; do \
- ${INSTALL_DATA} ${WRKSRC}/$$files ${STAGEDIR}${PREFIX}/arpwatch; \
- done
+.for F in ethercodes.dat d.awk duplicates.awk euppertolower.awk e.awk p.awk
+ ${INSTALL_DATA} ${WRKSRC}/${F} ${STAGEDIR}${PREFIX}/arpwatch
+.endfor
${INSTALL_SCRIPT} ${WRKSRC}/arp2ethers ${STAGEDIR}${PREFIX}/arpwatch
- ${INSTALL_SCRIPT} ${WRKSRC}/massagevendor ${STAGEDIR}${PREFIX}/arpwatch
+ ${INSTALL_SCRIPT} ${WRKSRC}/massagevendor.py \
+ ${STAGEDIR}${PREFIX}/arpwatch/massagevendor
+.if ${PORT_OPTIONS:METHERCODES}
+ ${INSTALL_DATA} ${WRKSRC}/ethercodes.dat ${STAGEDIR}${PREFIX}/arpwatch
+.endif
+
+post-configure:
+ ${REINPLACE_CMD} -e "/^LIBS *=/s,-lpcap,${LOCALBASE}/lib/libpcap.so.1," \
+ ${WRKSRC}/Makefile
.include <bsd.port.mk>
diff --git a/net-mgmt/arpwatch/distinfo b/net-mgmt/arpwatch/distinfo
index 2ba09eda56ce..3fa26e05fdff 100644
--- a/net-mgmt/arpwatch/distinfo
+++ b/net-mgmt/arpwatch/distinfo
@@ -1,2 +1,3 @@
-SHA256 (arpwatch-2.1a15.tar.gz) = c1df9737e208a96a61fa92ddad83f4b4d9be66f8992f3c917e9edf4b05ff5898
-SIZE (arpwatch-2.1a15.tar.gz) = 202729
+TIMESTAMP = 1575239752
+SHA256 (arpwatch-3.0.tar.gz) = 82e137e104aca8b1280f5cca0ebe61b978f10eadcbb4c4802c181522ad02b25b
+SIZE (arpwatch-3.0.tar.gz) = 407879
diff --git a/net-mgmt/arpwatch/files/patch-Makefile.in b/net-mgmt/arpwatch/files/patch-Makefile.in
deleted file mode 100644
index 642d61eccff8..000000000000
--- a/net-mgmt/arpwatch/files/patch-Makefile.in
+++ /dev/null
@@ -1,38 +0,0 @@
---- 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
--ARPDIR = $(prefix)/arpwatch
-+ARPDIR ?= $(prefix)/arpwatch
-
- # 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
- $(CC) $(CFLAGS) -o $@ zap.o intoa.o -lutil
-
- install: force
-- $(INSTALL) -m 555 -o bin -g bin arpwatch $(DESTDIR)$(BINDEST)
-- $(INSTALL) -m 555 -o bin -g bin arpsnmp $(DESTDIR)$(BINDEST)
-+ $(BSD_INSTALL_PROGRAM) arpwatch $(DESTDIR)$(BINDEST)
-+ $(BSD_INSTALL_PROGRAM) arpsnmp $(DESTDIR)$(BINDEST)
-
- install-man: force
-- $(INSTALL) -m 444 -o bin -g bin $(srcdir)/arpwatch.8 \
-+ $(BSD_INSTALL_MAN) $(srcdir)/arpwatch.8 \
- $(DESTDIR)$(MANDEST)/man8
-- $(INSTALL) -m 444 -o bin -g bin $(srcdir)/arpsnmp.8 \
-+ $(BSD_INSTALL_MAN) $(srcdir)/arpsnmp.8 \
- $(DESTDIR)$(MANDEST)/man8
-
- lint: $(GENSRC) force
diff --git a/net-mgmt/arpwatch/files/patch-arpsnmp.8 b/net-mgmt/arpwatch/files/patch-arpsnmp.8
deleted file mode 100644
index bc7bee391fe1..000000000000
--- a/net-mgmt/arpwatch/files/patch-arpsnmp.8
+++ /dev/null
@@ -1,34 +0,0 @@
---- arpsnmp.8.orig 2000-09-17 20:34:48 UTC
-+++ arpsnmp.8
-@@ -30,6 +30,9 @@ arpsnmp - keep track of ethernet/ip addr
- ] [
- .B -f
- .I datafile
-+] [
-+.B -m
-+.I email
- ]
- .I file
- [
-@@ -55,6 +58,12 @@ flag is used to set the ethernet/ip addr
- The default is
- .IR arp.dat .
- .LP
-+The
-+.B -m
-+flag specifies the address that will receive the emails.
-+The default is
-+.IR root .
-+.LP
- Note that an empty
- .I arp.dat
- file must be created before the first time you run
-@@ -69,7 +78,7 @@ man page for details on the report messa
- .na
- .nh
- .nf
--/usr/operator/arpwatch - default directory
-+/usr/local/arpwatch - default directory
- arp.dat - ethernet/ip address database
- ethercodes.dat - vendor ethernet block list
- .ad
diff --git a/net-mgmt/arpwatch/files/patch-arpsnmp.c b/net-mgmt/arpwatch/files/patch-arpsnmp.c
index 071fcdb571cb..89d72167bea8 100644
--- a/net-mgmt/arpwatch/files/patch-arpsnmp.c
+++ b/net-mgmt/arpwatch/files/patch-arpsnmp.c
@@ -1,39 +1,22 @@
---- arpsnmp.c.orig 2004-01-22 22:25:17 UTC
+--- arpsnmp.c.orig 2019-11-30 18:35:23 UTC
+++ arpsnmp.c
-@@ -68,6 +68,8 @@ __dead void usage(void) __attribute__((v
-
- char *prog;
-
-+char *Watcher;
-+
- extern int optind;
- extern int opterr;
- extern char *optarg;
-@@ -90,7 +92,7 @@ main(int argc, char **argv)
+@@ -104,7 +104,7 @@ main(int argc, char **argv)
}
opterr = 0;
-- while ((op = getopt(argc, argv, "df:")) != EOF)
-+ while ((op = getopt(argc, argv, "df:m:")) != EOF)
+- while ((op = getopt(argc, argv, "CdD:f:qsw:W:Z")) != EOF)
++ while ((op = getopt(argc, argv, "CdD:f:m:qsw:W:Z")) != EOF)
switch (op) {
- case 'd':
-@@ -105,6 +107,10 @@ main(int argc, char **argv)
- arpfile = optarg;
+ case 'C':
+@@ -135,6 +135,10 @@ main(int argc, char **argv)
+ ++suppress;
break;
+ case 'm':
-+ Watcher = optarg;
-+ break;
-+
- default:
- usage();
- }
-@@ -185,6 +191,6 @@ usage(void)
-
- (void)fprintf(stderr, "Version %s\n", version);
- (void)fprintf(stderr,
-- "usage: %s [-d] [-f datafile] file [...]\n", prog);
-+ "usage: %s [-d] [-f datafile] [-m email] file [...]\n", prog);
- exit(1);
- }
++ fprintf(stderr, "%s: WARNING: -m is deprecated,"
++ " please use -w instead\n", prog);
++ /* fallthrough */
+ case 'w':
+ watcher = optarg;
+ break;
diff --git a/net-mgmt/arpwatch/files/patch-arpwatch.8 b/net-mgmt/arpwatch/files/patch-arpwatch.8
deleted file mode 100644
index e2dfbf082ce0..000000000000
--- a/net-mgmt/arpwatch/files/patch-arpwatch.8
+++ /dev/null
@@ -1,59 +0,0 @@
---- arpwatch.8.orig 2000-10-08 20:31:28 UTC
-+++ arpwatch.8
-@@ -27,7 +27,7 @@ arpwatch - keep track of ethernet/ip add
- .na
- .B arpwatch
- [
--.B -dN
-+.B -dNvz
- ] [
- .B -f
- .I datafile
-@@ -38,6 +38,9 @@ arpwatch - keep track of ethernet/ip add
- .br
- .ti +8
- [
-+.B -m
-+.I email
-+] [
- .B -n
- .IR net [/ width
- ]] [
-@@ -71,6 +74,12 @@ The
- flag is used to override the default interface.
- .LP
- The
-+.B -m
-+flag specifies the address that will receive the emails.
-+The default is
-+.IR root .
-+.LP
-+The
- .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,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
-+The
- .B -r
- flag is used to specify a savefile
- (perhaps created by
-@@ -152,7 +170,7 @@ addresses was a DECnet address.
- .na
- .nh
- .nf
--/usr/operator/arpwatch - default directory
-+/usr/local/arpwatch - default directory
- arp.dat - ethernet/ip address database
- ethercodes.dat - vendor ethernet block list
- .ad
diff --git a/net-mgmt/arpwatch/files/patch-arpwatch.c b/net-mgmt/arpwatch/files/patch-arpwatch.c
index 427ed5554b4d..7f9246226a8c 100644
--- a/net-mgmt/arpwatch/files/patch-arpwatch.c
+++ b/net-mgmt/arpwatch/files/patch-arpwatch.c
@@ -1,66 +1,22 @@
---- arpwatch.c.orig 2004-01-22 22:18:20 UTC
+--- arpwatch.c.orig 2019-11-30 18:35:23 UTC
+++ arpwatch.c
-@@ -107,6 +107,8 @@ struct rtentry;
-
- char *prog;
-
-+char *Watcher = NULL;
-+
- int can_checkpoint;
- int swapped;
- int nobogons;
-@@ -170,7 +172,7 @@ main(int argc, char **argv)
+@@ -198,7 +198,7 @@ main(int argc, char **argv)
interface = NULL;
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, "CdD:Ff:i:n:NpP:qr:svw:W:x:zZ")) != EOF)
++ while ((op = getopt(argc, argv, "CdD:Ff:i:m:n:NpP:qr:svw:W:x:zZ")) != EOF)
switch (op) {
- case 'd':
-@@ -202,6 +204,16 @@ main(int argc, char **argv)
- rfilename = optarg;
+ case 'C':
+@@ -262,6 +262,10 @@ main(int argc, char **argv)
+ ++vrrpflag;
break;
+ case 'm':
-+ Watcher = optarg;
-+ break;
-+ case 'v':
-+ vrrpflag = 1;
-+ break;
-+ case 'z':
-+ zeroflag = 1;
-+ break;
-+
- default:
- usage();
- }
-@@ -321,7 +333,6 @@ main(int argc, char **argv)
-
- (void)setsignal(SIGINT, die);
- (void)setsignal(SIGTERM, die);
-- (void)setsignal(SIGHUP, die);
- if (rfilename == NULL) {
- (void)setsignal(SIGQUIT, checkpoint);
- (void)setsignal(SIGALRM, checkpoint);
-@@ -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]"
-- " [-n net[/width]] [-r file]\n", prog);
-+ " [-m email] [-n net[/width]] [-r file]\n", prog);
- exit(1);
- }
++ fprintf(stderr, "%s: WARNING: -m is deprecated,"
++ " please use -w instead\n", prog);
++ /* fallthrough */
+ case 'w':
+ watcher = optarg;
+ break;
diff --git a/net-mgmt/arpwatch/files/patch-configure b/net-mgmt/arpwatch/files/patch-configure
deleted file mode 100644
index 17f8b4a44daf..000000000000
--- a/net-mgmt/arpwatch/files/patch-configure
+++ /dev/null
@@ -1,20 +0,0 @@
---- configure.orig 2006-06-21 20:32:38 UTC
-+++ configure
-@@ -1419,7 +1419,7 @@ if test "${with_gcc+set}" = set; then
- withval="$with_gcc"
-
- fi;
-- V_CCOPT="-O"
-+# V_CCOPT="-O"
- V_INCLS=""
- if test "${srcdir}" != "." ; then
- V_INCLS="-I\$\(srcdir\)"
-@@ -5299,7 +5299,7 @@ echo "${ECHO_T}$ac_cv_lbl_gcc_vers" >&6
- fi
- V_CCOPT="$V_CCOPT -Wall"
- if test "$ac_cv_lbl_gcc_vers" -gt 1 ; then
-- V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
-+# V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
- fi
- fi
- else
diff --git a/net-mgmt/arpwatch/files/patch-db.c b/net-mgmt/arpwatch/files/patch-db.c
deleted file mode 100644
index 6da9f5def771..000000000000
--- a/net-mgmt/arpwatch/files/patch-db.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- db.c.orig 2000-09-30 23:39:58 UTC
-+++ db.c
-@@ -283,7 +283,7 @@ elist_alloc(register u_int32_t a, regist
- BCOPY(e, ep->e, 6);
- if (h == NULL && !initializing)
- h = getsname(a);
-- if (h != NULL && !isdigit((int)*h))
-+ if (h != NULL)
- strcpy(ep->h, h);
- ep->t = t;
- return (ep);
-@@ -301,7 +301,7 @@ check_hname(register struct ainfo *ap)
- return;
- ep = ap->elist[0];
- h = getsname(ap->a);
-- if (!isdigit((int)*h) && strcmp(h, ep->h) != 0) {
-+ if (h != NULL && strcmp(h, ep->h) != 0) {
- syslog(LOG_INFO, "hostname changed %s %s %s -> %s",
- intoa(ap->a), e2str(ep->e), ep->h, h);
- strcpy(ep->h, h);
diff --git a/net-mgmt/arpwatch/files/patch-dns.c b/net-mgmt/arpwatch/files/patch-dns.c
deleted file mode 100644
index b677a14e38b4..000000000000
--- a/net-mgmt/arpwatch/files/patch-dns.c
+++ /dev/null
@@ -1,33 +0,0 @@
---- dns.c.orig 2000-10-14 01:50:52 UTC
-+++ dns.c
-@@ -137,7 +137,7 @@ gethinfo(register char *hostname, regist
- return (0);
- }
-
--/* Return the cannonical name of the host */
-+/* Return the canonical name of the host (NULL if not found) */
- char *
- gethname(u_int32_t a)
- {
-@@ -150,18 +150,18 @@ gethname(u_int32_t a)
- hp = gethostbyaddr((char *)&a, sizeof(a), AF_INET);
- _res.options = options;
- if (hp == NULL)
-- return (intoa(a));
-+ return NULL;
- return (hp->h_name);
- }
-
--/* Return the simple name of the host */
-+/* Return the simple name of the host (NULL if not found) */
- char *
- getsname(register u_int32_t a)
- {
- register char *s, *cp;
-
- s = gethname(a);
-- if (!isdigit((int)*s)) {
-+ if (s != NULL) {
- cp = strchr(s, '.');
- if (cp != NULL)
- *cp = '\0';
diff --git a/net-mgmt/arpwatch/files/patch-report.c b/net-mgmt/arpwatch/files/patch-report.c
deleted file mode 100644
index 96b8f77753e0..000000000000
--- a/net-mgmt/arpwatch/files/patch-report.c
+++ /dev/null
@@ -1,76 +0,0 @@
---- report.c.orig 2000-09-30 23:41:10 UTC
-+++ report.c
-@@ -45,6 +45,8 @@ struct rtentry;
-
- #include <ctype.h>
- #include <errno.h>
-+#include <fcntl.h>
-+#include <paths.h>
- #include <signal.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -70,6 +72,8 @@ struct rtentry;
-
- #define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
-
-+extern char *Watcher;
-+
- static int cdepth; /* number of outstanding children */
-
- static char *fmtdate(time_t);
-@@ -240,7 +244,7 @@ report(register char *title, register u_
- register FILE *f;
- char tempfile[64], cpu[64], os[64];
- char *fmt = "%20s: %s\n";
-- char *watcher = WATCHER;
-+ char *watcher = Watcher ? Watcher : WATCHER;
- char *watchee = WATCHEE;
- char *sendmail = PATH_SENDMAIL;
- char *unknown = "<unknown>";
-@@ -251,6 +255,11 @@ report(register char *title, register u_
- if (initializing)
- return;
-
-+ /* No mail for 0.0.0.0 if -z */
-+ if (zeroflag == 1 && strncmp("0.0.0.0",intoa(a),16) == 0 ) {
-+ dosyslog(LOG_NOTICE, title, a, e1, e2);
-+ return;
-+ }
- if (debug) {
- if (debug > 1) {
- dosyslog(LOG_NOTICE, title, a, e1, e2);
-@@ -303,7 +312,7 @@ report(register char *title, register u_
- (void)fprintf(f, "From: %s\n", watchee);
- (void)fprintf(f, "To: %s\n", watcher);
- hn = gethname(a);
-- if (!isdigit(*hn))
-+ if (hn != NULL)
- (void)fprintf(f, "Subject: %s (%s)\n", title, hn);
- else {
- (void)fprintf(f, "Subject: %s\n", title);
-@@ -344,6 +353,25 @@ report(register char *title, register u_
- exit(1);
- }
- /* XXX Need to freopen()? */
-+
-+ /*
-+ * Open /dev/null as stdout and stderr so that sendmail 8.12.1 (and
-+ * above ?) won't complain about missing file descriptors.
-+ */
-+ if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
-+ syslog(LOG_ERR, "Cannot open %s: %m", _PATH_DEVNULL);
-+ exit(1);
-+ }
-+ if (dup2(fd, STDOUT_FILENO) == -1) {
-+ syslog(LOG_ERR, "Cannot dup2 %s to stdout: %m", _PATH_DEVNULL);
-+ exit(1);
-+ }
-+ if (dup2(fd, STDERR_FILENO) == -1) {
-+ syslog(LOG_ERR, "Cannot dup2 %s to stderr: %m", _PATH_DEVNULL);
-+ exit(1);
-+ }
-+ close(fd);
-+
- /* Always Deliver interactively (pause when child depth gets large) */
- execl(sendmail, "sendmail", "-odi", watcher, NULL);
- syslog(LOG_ERR, "execl: %s: %m", sendmail);
diff --git a/net-mgmt/arpwatch/files/patch-util.c b/net-mgmt/arpwatch/files/patch-util.c
deleted file mode 100644
index 88071da8b4df..000000000000
--- a/net-mgmt/arpwatch/files/patch-util.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- util.c.orig 2004-01-22 22:25:39 UTC
-+++ util.c
-@@ -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 */
-
- /* syslog() helper routine */
diff --git a/net-mgmt/arpwatch/files/patch-util.h b/net-mgmt/arpwatch/files/patch-util.h
deleted file mode 100644
index 4aafd0327270..000000000000
--- a/net-mgmt/arpwatch/files/patch-util.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- util.h.orig 1996-10-06 10:22:14 UTC
-+++ util.h
-@@ -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;
diff --git a/net-mgmt/arpwatch/files/pkg-message.in b/net-mgmt/arpwatch/files/pkg-message.in
index 0d024378e1f8..2e9b2bbff74f 100644
--- a/net-mgmt/arpwatch/files/pkg-message.in
+++ b/net-mgmt/arpwatch/files/pkg-message.in
@@ -1,12 +1,18 @@
[
{ type: install
message: <<EOM
-You can update the ethercodes.dat file executing the following steps
+You can update the ethercodes.dat file executing the following steps:
-cd %%PREFIX%%/arpwatch
-fetch -o- http://standards-oui.ieee.org//oui.txt | tr -d "\15" > oui.txt
-./massagevendor oui.txt > ethercodes.dat
-rm oui.txt
+ cd %%PREFIX%%/arpwatch
+ fetch http://standards-oui.ieee.org/oui/oui.csv
+ ./massagevendor oui.csv > ethercodes.dat
+ rm oui.csv
+
+You might also want to disable the ETHERCODES option when building
+to avoid clobbering ethercodes.dat on update or reinstall.
+
+The -m flag is deprecated. If you are using the -m watcher flag,
+please switch to -w.
EOM
}
]
diff --git a/net-mgmt/arpwatch/pkg-descr b/net-mgmt/arpwatch/pkg-descr
index 87e59568d0d5..d1ddda9ef761 100644
--- a/net-mgmt/arpwatch/pkg-descr
+++ b/net-mgmt/arpwatch/pkg-descr
@@ -2,4 +2,4 @@ This package contains tools that monitors ethernet activity and
maintains a database of ethernet/ip address pairings. It also reports
certain changes via email.
-WWW: http://ee.lbl.gov/
+WWW: https://ee.lbl.gov/downloads/arpwatch/
diff --git a/net-mgmt/arpwatch/pkg-plist b/net-mgmt/arpwatch/pkg-plist
index 6d977f704b74..a0691e80993a 100644
--- a/net-mgmt/arpwatch/pkg-plist
+++ b/net-mgmt/arpwatch/pkg-plist
@@ -6,6 +6,7 @@ arpwatch/ethercodes.dat
arpwatch/euppertolower.awk
arpwatch/massagevendor
arpwatch/p.awk
+etc/rc.d/arpwatch
man/man8/arpsnmp.8.gz
man/man8/arpwatch.8.gz
sbin/arpsnmp