Download raw body.
UPDATE net/arpwatch from 2.1a15 to 3.9
Just a double-check to see if there's any interest in this port update.
On Fri, Jun 26, 2026 at 09:43:54AM -0700, James J. Lippard wrote:
> Here's a diff that updates to the latest version (3.9, released
> October 2025) which removes the need for some of the patches that have
> made their way upstream; also completes the partial removal of DECnet
> code in the prior patches (and in the man pages), and adds use of
> pledge and unveil.
>
> --
> Jim Lippard lippard-openbsd@discord.org http://www.discord.org/
> GPG Key ID: 0x99FD5CD6
>
>
> Only in /usr/ports/net/arpwatch: CVS
> diff -urp /usr/ports/net/arpwatch/Makefile /usr/ports/mystuff/net/arpwatch/Makefile
> --- /usr/ports/net/arpwatch/Makefile Sun Dec 17 08:27:32 2023
> +++ /usr/ports/mystuff/net/arpwatch/Makefile Thu Jun 25 18:23:52 2026
> @@ -1,10 +1,10 @@
> COMMENT= monitor arp & rarp requests
>
> -DISTNAME= arpwatch-2.1a15
> -REVISION= 21
> +DISTNAME= arpwatch-3.9
> +#REVISION= 0
> CATEGORIES= net
>
> -SITES= ftp://ftp.ee.lbl.gov/
> +SITES= https://ee.lbl.gov/downloads/arpwatch/
>
> MAINTAINER= Jasper Lievisse Adriaanse <jasper@openbsd.org>
>
> @@ -16,6 +16,8 @@ WANTLIB= c pcap
> CONFIGURE_STYLE= gnu
> MAKE_FLAGS+= ARPDIR=${LOCALSTATEDIR}/arpwatch
>
> +CONFIGURE_ARGS+= --enable-zeropad
> +
> # this provides an up-to-date pregenerated ethercodes.dat file
> RUN_DEPENDS= net/arp-scan,-mac
>
> @@ -27,7 +29,8 @@ pre-build:
> ${SUBST_CMD} ${WRKSRC}/arpsnmp.8 ${WRKSRC}/arpwatch.8
>
> do-install:
> - @sed -i 's,awk -f ,awk -f ${EXAMPLESDIR}/', ${WRKSRC}/massagevendor
> + @sed -i 's,awk -f ,awk -f ${EXAMPLESDIR}/', ${WRKSRC}/massagevendor-old
> + @sed -i 's,awk -f ,awk -f ${EXAMPLESDIR}/', ${WRKSRC}/massagevendor.py
> ${INSTALL_PROGRAM} ${WRKSRC}/arpwatch ${PREFIX}/sbin
> ${INSTALL_PROGRAM} ${WRKSRC}/arpsnmp ${PREFIX}/sbin
> ${INSTALL_MAN} ${WRKSRC}/arpwatch.8 ${PREFIX}/man/man8
> @@ -36,6 +39,7 @@ do-install:
> ${INSTALL_DATA} ${WRKSRC}/*.awk ${EXAMPLESDIR}
> @${INSTALL_DATA} /dev/null ${EXAMPLESDIR}/arp.dat
> @${INSTALL_SCRIPT} ${WRKSRC}/arp2ethers ${EXAMPLESDIR}
> - @${INSTALL_SCRIPT} ${WRKSRC}/massagevendor ${EXAMPLESDIR}
> + @${INSTALL_SCRIPT} ${WRKSRC}/massagevendor-old ${EXAMPLESDIR}
> + @${INSTALL_SCRIPT} ${WRKSRC}/massagevendor.py ${EXAMPLESDIR}
>
> .include <bsd.port.mk>
> diff -urp /usr/ports/net/arpwatch/distinfo /usr/ports/mystuff/net/arpwatch/distinfo
> --- /usr/ports/net/arpwatch/distinfo Tue Nov 3 08:51:24 2015
> +++ /usr/ports/mystuff/net/arpwatch/distinfo Thu Jun 25 18:23:27 2026
> @@ -1,2 +1,3 @@
> -SHA256 (arpwatch-2.1a15.tar.gz) = wd+XN+IIqWph+pLdrYP0tNm+ZviZLzyRfp7fSwX/WJg=
> -SIZE (arpwatch-2.1a15.tar.gz) = 202729
> +SHA256 (arpwatch-3.9.tar.gz) = 832d20a5a508d9694a84a17e2627de3b3aa8b42b19ebdd97e264c511168f6eb4
> +SIZE (arpwatch-3.9.tar.gz) = 117466
> +
> Only in /usr/ports/net/arpwatch/patches: CVS
> diff -urp /usr/ports/net/arpwatch/patches/patch-arpsnmp.8 /usr/ports/mystuff/net/arpwatch/patches/patch-arpsnmp.8
> --- /usr/ports/net/arpwatch/patches/patch-arpsnmp.8 Sun Dec 17 08:27:32 2023
> +++ /usr/ports/mystuff/net/arpwatch/patches/patch-arpsnmp.8 Fri Jun 26 09:31:13 2026
> @@ -1,12 +1,19 @@
> Index: arpsnmp.8
> ---- arpsnmp.8.orig
> -+++ arpsnmp.8
> -@@ -69,7 +69,7 @@ man page for details on the report messages generated
> - .na
> - .nh
> - .nf
> --/usr/operator/arpwatch - default directory
> -+${LOCALSTATEDIR}/arpwatch - default directory
> - arp.dat - ethernet/ip address database
> - ethercodes.dat - vendor ethernet block list
> - .ad
> +--- arpsnmp.8.in.orig Sun Dec 1 12:01:07 2019
> ++++ arpsnmp.8.in Fri Jun 26 09:27:53 2026
> +@@ -77,7 +77,7 @@
> + flag is used to specify the
> + .B arpwatch
> + working directory. This defaults to
> +-.Ar /usr/local/arpwatch .
> ++.Ar ${LOCALSTATEDIR}/arpwatch .
> + .Pp
> + The
> + .Fl f
> +@@ -152,6 +152,3 @@
> + the
> + .Ar arp.dat
> + file.
> +-.Pp
> +-Attempts are made to suppress DECnet flip flops but they
> +-aren't always successful.
> diff -urp /usr/ports/net/arpwatch/patches/patch-arpwatch.8 /usr/ports/mystuff/net/arpwatch/patches/patch-arpwatch.8
> --- /usr/ports/net/arpwatch/patches/patch-arpwatch.8 Sun Dec 17 08:27:32 2023
> +++ /usr/ports/mystuff/net/arpwatch/patches/patch-arpwatch.8 Fri Jun 26 09:30:28 2026
> @@ -1,43 +1,80 @@
> Add -u flag, to drop privileges to that user given
>
> Index: arpwatch.8
> ---- arpwatch.8.orig
> -+++ arpwatch.8
> -@@ -43,6 +43,9 @@ arpwatch - keep track of ethernet/ip address pairings
> - ]] [
> - .B -r
> - .I file
> -+] [
> -+.B -u
> -+.I username
> - ]
> - .ad
> - .SH DESCRIPTION
> -@@ -94,6 +97,18 @@ of reading from the network. In this case,
> - .B arpwatch
> +--- arpwatch.8.in.orig Sat Dec 2 17:48:53 2023
> ++++ arpwatch.8.in Fri Jun 26 09:27:35 2026
> +@@ -43,6 +43,7 @@
> + .Op Fl n Ar net[/width]
> + .Op Fl x Ar net[/width]
> + .Op Fl r Ar file
> ++.Op Fl u Ar username
> + .Sh DESCRIPTION
> + .Nm
> + keeps track of ethernet/ip address pairings. It syslogs activity
> +@@ -78,7 +79,7 @@
> + flag is used to specify the
> + .Nm
> + working directory. This defaults to
> +-.Ar /usr/local/arpwatch .
> ++.Ar ${LOCALSTATEDIR}/arpwatch .
> + .Pp
> + The
> + .Fl f
> +@@ -134,6 +135,18 @@
> + .Nm
> does not fork.
> - .LP
> + .Pp
> +The
> -+.B -u
> ++.Fl u
> +flag instructs
> -+.B arpwatch
> ++.Xr arpwatch
> +to drop root privileges and change the UID to
> -+.I username
> ++.It Pa username
> +and GID to the primary group of
> -+.I username .
> ++.It Pa username .
> +This is recommended for security reasons, but
> -+.I username
> ++.It Pa username
> +has to have write access to the default directory.
> -+.LP
> ++.Pp
> Note that an empty
> - .I arp.dat
> + .Ar arp.dat
> file must be created before the first time you run
> -@@ -152,7 +167,7 @@ addresses was a DECnet address.
> - .na
> - .nh
> - .nf
> --/usr/operator/arpwatch - default directory
> -+${LOCALSTATEDIR}/arpwatch - default directory
> - arp.dat - ethernet/ip address database
> - ethercodes.dat - vendor ethernet block list
> - .ad
> +@@ -187,8 +200,6 @@
> + .It Ic "flip flop"
> + The ethernet address has changed from the most recently seen address to
> + the second most recently seen address.
> +-(If either the old or new ethernet address is a DECnet address and it
> +-is less than 24 hours, the email version of the report is suppressed.)
> + .TP
> + .It Ic "changed ethernet address"
> + The host switched to a new ethernet address.
> +@@ -211,9 +222,6 @@
> + The ethernet address has changed from the most recently seen address to
> + the third (or greater) least recently seen address.
> + (This is similar to a flip flop.)
> +-.It Ic "suppressed DECnet flip flop"
> +-A "flip flop" report was suppressed because one of the two
> +-addresses was a DECnet address.
> + .Sh SIGNALS
> + Normally
> + .Nm
> +@@ -222,8 +230,8 @@
> + once every 15 minutes.
> + The SIGHUP signal causes it to update immediately.
> + .Sh FILES
> +-.Bl -tag -width ".Pa /usr/local/arpwatch" -compact
> +-.It Pa /usr/local/arpwatch
> ++.Bl -tag -width ".Pa ${LOCALSTATEDIR}/arpwatch" -compact
> ++.It Pa ${LOCALSTATEDIR}/arpwatch
> + default directory
> + .It Pa arp.dat
> + default ethernet/ip address database
> +@@ -247,8 +255,5 @@
> + .Sh BUGS
> + Please send bug reports to
> + .Aq arpwatch@ee.lbl.gov .
> +-.Pp
> +-Attempts are made to suppress DECnet flip flops but they
> +-aren't always successful.
> + .Pp
> + Most error messages are posted using syslog.
> diff -urp /usr/ports/net/arpwatch/patches/patch-arpwatch_c /usr/ports/mystuff/net/arpwatch/patches/patch-arpwatch_c
> --- /usr/ports/net/arpwatch/patches/patch-arpwatch_c Fri Mar 11 12:45:45 2022
> +++ /usr/ports/mystuff/net/arpwatch/patches/patch-arpwatch_c Fri Jun 26 09:34:36 2026
> @@ -1,11 +1,12 @@
> - Do not bail if the interface does not have an IP assigned.
> - time_t format string fixes
> - add -u flag, to drop privileges to that user
> +- pledge and unveil
>
> Index: arpwatch.c
> ---- arpwatch.c.orig
> -+++ arpwatch.c
> -@@ -63,6 +63,9 @@ struct rtentry;
> +--- arpwatch.c.orig Sun Dec 3 11:10:05 2023
> ++++ arpwatch.c Thu Jun 25 07:29:02 2026
> +@@ -72,6 +72,9 @@
> #include <syslog.h>
> #include <unistd.h>
>
> @@ -15,9 +16,9 @@ Index: arpwatch.c
> #include <pcap.h>
>
> #include "gnuc.h"
> -@@ -141,6 +144,24 @@ int sanity_ether(struct ether_header *, struct ether_a
> - int sanity_fddi(struct fddi_header *, struct ether_arp *, int);
> - __dead void usage(void) __attribute__((volatile));
> +@@ -172,6 +175,24 @@
> + int toskip(u_int32_t);
> + void usage(void) __attribute__((noreturn));
>
> +void dropprivileges(const char* user)
> +{
> @@ -40,25 +41,25 @@ Index: arpwatch.c
> int
> main(int argc, char **argv)
> {
> -@@ -153,6 +174,7 @@ main(int argc, char **argv)
> - register char *interface, *rfilename;
> +@@ -183,6 +204,7 @@
> + char *interface, *rfilename;
> struct bpf_program code;
> char errbuf[PCAP_ERRBUF_SIZE];
> + char* username = NULL;
>
> if (argv[0] == NULL)
> prog = "arpwatch";
> -@@ -170,7 +192,7 @@ main(int argc, char **argv)
> +@@ -200,7 +222,7 @@
> interface = NULL;
> rfilename = NULL;
> pd = NULL;
> -- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
> -+ while ((op = getopt(argc, argv, "df:i:n:Nr:u:")) != 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:n:NpP:qr:u:svw:W:x:zZ")) != EOF)
> switch (op) {
>
> - case 'd':
> -@@ -202,6 +224,19 @@ main(int argc, char **argv)
> - rfilename = optarg;
> + case 'C':
> +@@ -285,6 +307,19 @@
> + zeropad = 1;
> break;
>
> + case 'u':
> @@ -77,23 +78,8 @@ Index: arpwatch.c
> default:
> usage();
> }
> -@@ -223,9 +258,11 @@ main(int argc, char **argv)
> -
> - /* Determine network and netmask */
> - if (pcap_lookupnet(interface, &net, &netmask, errbuf) < 0) {
> -- (void)fprintf(stderr, "%s: bad interface %s: %s\n",
> -- prog, interface, errbuf);
> -- exit(1);
> -+ (void)fprintf(stderr,
> -+ "%s: WARNING: cannot determine net/mask: %s\n",
> -+ prog, errbuf);
> -+ net = 0;
> -+ netmask = 0;
> +@@ -381,13 +416,32 @@
> }
> -
> - /* Drop into the background if not debugging */
> -@@ -279,12 +316,16 @@ main(int argc, char **argv)
> - #endif
> }
>
> + if ( username ) {
> @@ -109,32 +95,65 @@ Index: arpwatch.c
> + setuid(getuid());
> + }
>
> ++ /* unveil */
> ++ /* r for /, x for sendmail, rwc for /tmp and arpdir, rw for /dev/null */
> ++ if (unveil ("/", "r") == -1)
> ++ lg(LOG_ERR, "unveil /");
> ++ if (unveil ("/tmp", "rwc") == -1)
> ++ lg(LOG_ERR, "unveil /tmp");
> ++ if (unveil ("/dev/null", "rw") == -1)
> ++ lg(LOG_ERR, "unveil /dev/null");
> ++ if (unveil ("/usr/sbin/sendmail", "x") == -1)
> ++ lg(LOG_ERR, "unveil /usr/sbin/sendmail");
> ++ if (unveil (arpdir, "rwc") == -1)
> ++ lg(LOG_ERR, "unveil %s", arpdir);
> ++ if (unveil(NULL, NULL) == -1)
> ++ lg(LOG_ERR, "unveil");
> ++
> /* Must be ethernet or fddi */
> linktype = pcap_datalink(pd);
> -@@ -401,7 +442,7 @@ process_ether(register u_char *u, register const struc
> + if (linktype != DLT_EN10MB && linktype != DLT_FDDI) {
> +@@ -405,6 +459,13 @@
> + lg(LOG_ERR, "pcap_setfilter: %s", pcap_geterr(pd));
> + exit(1);
> + }
> ++
> ++ /* pledge not used earlier because prior need of pcap_filter BIOCSETF, not in bpf promise */
> ++ if (pledge ("stdio rpath wpath cpath inet dns proc exec tty bpf", NULL) == -1) {
> ++ lg(LOG_ERR, "pledge: %s", strerror(errno));
> ++ exit(1);
> ++ }
> ++
> + if (rfilename == NULL)
> + lg(LOG_INFO, "listening on %s", interface);
> +
> +@@ -513,8 +574,8 @@
> t = h->ts.tv_sec;
> can_checkpoint = 0;
> if (!ent_add(sia, sea, t, NULL))
> -- syslog(LOG_ERR, "ent_add(%s, %s, %ld) failed",
> -+ syslog(LOG_ERR, "ent_add(%s, %s, %lld) failed",
> - intoa(sia), e2str(sea), t);
> +- lg(LOG_ERR, "ent_add(%s, %s, %ld) failed",
> +- intoa(sia), e2str(sea), (u_long)t);
> ++ lg(LOG_ERR, "ent_add(%s, %s, %lld) failed",
> ++ intoa(sia), e2str(sea), t);
> can_checkpoint = 1;
> - }
> -@@ -550,7 +591,7 @@ process_fddi(register u_char *u, register const struct
> +
> + if (docheckpoint) {
> +@@ -673,8 +734,8 @@
> t = h->ts.tv_sec;
> can_checkpoint = 0;
> if (!ent_add(sia, sea, t, NULL))
> -- syslog(LOG_ERR, "ent_add(%s, %s, %ld) failed",
> -+ syslog(LOG_ERR, "ent_add(%s, %s, %lld) failed",
> - intoa(sia), e2str(sea), t);
> +- lg(LOG_ERR, "ent_add(%s, %s, %ld) failed",
> +- intoa(sia), e2str(sea), (u_long)t);
> ++ lg(LOG_ERR, "ent_add(%s, %s, %lld) failed",
> ++ intoa(sia), e2str(sea), t);
> can_checkpoint = 1;
> - }
> -@@ -750,7 +791,7 @@ usage(void)
> - extern char version[];
>
> - (void)fprintf(stderr, "Version %s\n", version);
> -- (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
> -+ (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface] [-u username]"
> - " [-n net[/width]] [-r file]\n", prog);
> + if (docheckpoint) {
> +@@ -944,6 +1005,6 @@
> + "usage: %s [-CdFNpqsvzZ] [-D arpdir] [-f datafile]"
> + " [-i interface]\n\t"
> + " [-P pidfile] [-w watcher@email] [-W watchee@email]\n\t"
> +- " [-n net[/width]] [-x net[/width]] [-r file]\n", prog);
> ++ " [-n net[/width]] [-x net[/width]] [-r file] [-u username]\n", prog);
> exit(1);
> }
> diff -urp /usr/ports/net/arpwatch/patches/patch-db_c /usr/ports/mystuff/net/arpwatch/patches/patch-db_c
> --- /usr/ports/net/arpwatch/patches/patch-db_c Fri Mar 11 12:45:45 2022
> +++ /usr/ports/mystuff/net/arpwatch/patches/patch-db_c Thu Jun 25 18:23:27 2026
> @@ -4,34 +4,35 @@ https://sources.debian.org/patches/arpwatch/2.1a15-6/2
> remove DECnet remnants
>
> Index: db.c
> ---- db.c.orig
> -+++ db.c
> -@@ -95,6 +95,11 @@ ent_add(register u_int32_t a, register u_char *e, time
> - u_char *e2;
> +--- db.c.orig 2026-04-12 15:35:26
> ++++ db.c 2026-04-12 15:40:46
> +@@ -108,6 +108,11 @@
> time_t t2;
> + char *host;
>
> + /* Ignore 0.0.0.0 */
> + if (a == 0) {
> -+ return(1);
> ++ return(1);
> + }
> +
> /* Lookup ip address */
> ap = ainfo_find(a);
>
> -@@ -124,14 +129,11 @@ ent_add(register u_int32_t a, register u_char *e, time
> - ep = ap->elist[1];
> - if (MEMCMP(e, ep->e, 6) == 0) {
> - /*
> -- * Suppress report when less than
> -- * FLIPFLOP_DELTA and one of the two ethernet
> -- * addresses is a DECnet logical.
> -+ * Suppress report when less than FLIPFLOP_DELTA.
> +@@ -193,12 +198,11 @@
> */
> t2 = ap->elist[0]->t;
> e2 = ap->elist[0]->e;
> - if (t - t2 < FLIPFLIP_DELTA &&
> -- (isdecnet(e) || isdecnet(e2)))
> -+ if (t - t2 < FLIPFLIP_DELTA)
> - dosyslog(LOG_INFO,
> - "suppressed DECnet flip flop", a, e, e2);
> - else
> +- (isdecnet(e) || isdecnet(e2))) {
> +- if (!quiet)
> +- dosyslog(LOG_INFO,
> +- "suppressed DECnet flip flop",
> +- a, e, e2);
> ++ if (t - t2 < FLIPFLIP_DELTA) {
> ++ if (!quiet)
> ++ dosyslog(LOG_INFO,
> ++ "suppressed flip flop",
> ++ a, e, e2);
> + } else if (!suppress)
> + report("flip flop", a, e, e2, &t, &t2);
> + ap->elist[1] = ap->elist[0];
> diff -urp /usr/ports/net/arpwatch/patches/patch-ec_c /usr/ports/mystuff/net/arpwatch/patches/patch-ec_c
> --- /usr/ports/net/arpwatch/patches/patch-ec_c Fri Mar 11 12:45:45 2022
> +++ /usr/ports/mystuff/net/arpwatch/patches/patch-ec_c Thu Jun 25 18:23:27 2026
> @@ -1,14 +1,14 @@
> -zero-pad MAC address to match ifconfig(8) output
> -https://sources.debian.org/patches/arpwatch/2.1a15-6/33_bug315215_zero-pad-MAC/
> +[no longer needed: zero-pad MAC address to match ifconfig(8) output
> +https://sources.debian.org/patches/arpwatch/2.1a15-6/33_bug315215_zero-pad-MAC/]
>
> remove DECnet remnants
>
> use a red-black tree instead of linked list for searching vendor IDs
>
> Index: ec.c
> ---- ec.c.orig
> -+++ ec.c
> -@@ -58,20 +58,28 @@ struct rtentry;
> +--- ec.c.orig Mon May 27 10:59:50 2024
> ++++ ec.c Mon May 27 13:41:10 2024
> +@@ -66,20 +66,28 @@
> #include "arpwatch.h"
> #include "ec.h"
> #include "util.h"
> @@ -17,14 +17,14 @@ Index: ec.c
> /* Basic data structure */
> -struct ecent {
> +struct ecnode {
> -+ RB_ENTRY(ecnode) entry;
> ++ RB_ENTRY(ecnode) entry;
> u_int32_t o; /* first 3 octets */
> char *text; /* associated text */
> };
>
> -static struct ecent *list;
> --static u_int ec_last = 0;
> --static u_int ec_len = 0;
> +-static u_int ec_last;
> +-static u_int ec_len;
> -
> /* Forwards */
> -static int ec_a2o(char *, u_int32_t *);
> @@ -34,7 +34,7 @@ Index: ec.c
> +int
> +ocmp(struct ecnode *e1, struct ecnode *e2)
> +{
> -+ return (e1->o < e2->o ? -1 : e1->o > e2->o);
> ++ return (e1->o < e2->o ? -1 : e1->o > e2->o ? 1 : 0);
> +}
> +
> +RB_HEAD(ectree, ecnode) head = RB_INITIALIZER(&head);
> @@ -42,27 +42,32 @@ Index: ec.c
> +
> /* Convert an 3 octets from an ethernet address to a u_int32_t */
> static int
> - ec_a2o(register char *cp, register u_int32_t *op)
> -@@ -91,23 +99,18 @@ ec_a2o(register char *cp, register u_int32_t *op)
> + ec_a2o(char *cp, u_int32_t *op)
> +@@ -99,28 +107,18 @@
> int
> - ec_add(register u_int32_t o, register char *text)
> + ec_add(u_int32_t o, const char *text)
> {
> -+ struct ecnode *n;
> +- struct ecent *olist;
> ++ struct ecnode *n;
>
> - if (ec_last >= ec_len) {
> - if (list == NULL) {
> - ec_len = 512;
> +- olist = NULL;
> - list = malloc(ec_len * sizeof(*list));
> - } else {
> - ec_len *= 2;
> -- list = realloc(list, ec_len * sizeof(*list));
> +- olist = list;
> +- list = realloc(olist, ec_len * sizeof(*list));
> - }
> - if (list == NULL) {
> -- syslog(LOG_ERR, "ec_add(): malloc: %m");
> +- if (olist != NULL)
> +- free(olist);
> +- lg(LOG_ERR, "ec_add(): malloc: %s", strerror(errno));
> - exit(1);
> - }
> + if ((n = malloc(sizeof(struct ecnode))) == NULL) {
> -+ syslog(LOG_ERR, "%s: malloc\n", __func__);
> ++ syslog(LOG_ERR, "%s: malloc\n", __func__);
> + return (0);
> }
> - list[ec_last].o = o;
> @@ -73,21 +78,21 @@ Index: ec.c
> + n->text = savestr(text);
> +
> + RB_INSERT(ectree, &head, n);
> -+
> ++
> return (1);
> }
>
> -@@ -115,16 +118,16 @@ ec_add(register u_int32_t o, register char *text)
> +@@ -128,16 +126,16 @@
> char *
> - ec_find(register u_char *e)
> + ec_find(const u_char *e)
> {
> - u_int32_t o;
> -- register int i;
> -+ struct ecnode find, *res;
> +- int i;
> ++ struct ecnode find, *res;
> + u_int32_t o = 0;
>
> - o = 0;
> - BCOPY(e, &o, 3);
> + memmove(&o, e, 3);
> - for (i = 0; i < ec_last; ++i)
> - if (list[i].o == o)
> - return (list[i].text);
> @@ -96,36 +101,26 @@ Index: ec.c
> + find.o = o;
> + res = RB_FIND(ectree, &head, &find);
> + if (res == NULL)
> -+ return (NULL);
> ++ return (NULL);
> + else
> -+ return res->text;
> ++ return res->text;
> }
>
> /* Loop through the ethernet code database */
> -@@ -182,17 +185,6 @@ ec_loop(register FILE *f, ec_process fn, register cons
> - return (1);
> - }
> +@@ -193,16 +191,6 @@
> + }
>
> + return (1);
> +-}
> +-
> -/* DECnet local logical address prefix */
> -static u_char decnet[3] = { 0xaa, 0x0, 0x4 };
> -
> -/* Returns true if an ethernet address is decnet, else false */
> -int
> --isdecnet(register u_char *e)
> +-isdecnet(const u_char *e)
> -{
> --
> -- return (MEMCMP(e, decnet, sizeof(decnet)) == 0);
> --}
> --
> - /* Convert an ascii ethernet string to ethernet address */
> - int
> - str2e(register char *str, register u_char *e)
> -@@ -218,7 +210,7 @@ e2str(register u_char *e)
> - {
> - static char str[32];
> -
> -- (void)sprintf(str, "%x:%x:%x:%x:%x:%x",
> -+ (void)sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x",
> - e[0], e[1], e[2], e[3], e[4], e[5]);
> - return (str);
> +- return (memcmp(e, decnet, sizeof(decnet)) == 0);
> }
> +
> + /* Convert an ascii ethernet string to ethernet address */
> Only in /usr/ports/mystuff/net/arpwatch/patches: patch-ec_h
> Only in /usr/ports/net/arpwatch/patches: patch-report_c
> Only in /usr/ports/net/arpwatch/pkg: CVS
> diff -urp /usr/ports/net/arpwatch/pkg/PLIST /usr/ports/mystuff/net/arpwatch/pkg/PLIST
> --- /usr/ports/net/arpwatch/pkg/PLIST Mon Nov 27 23:29:22 2023
> +++ /usr/ports/mystuff/net/arpwatch/pkg/PLIST Thu Jun 25 18:23:27 2026
> @@ -19,6 +19,7 @@ share/examples/arpwatch/d.awk
> share/examples/arpwatch/duplicates.awk
> share/examples/arpwatch/e.awk
> share/examples/arpwatch/euppertolower.awk
> -share/examples/arpwatch/massagevendor
> +share/examples/arpwatch/massagevendor-old
> +share/examples/arpwatch/massagevendor.py
> share/examples/arpwatch/p.awk
> @rcscript ${RCDIR}/arpwatch
UPDATE net/arpwatch from 2.1a15 to 3.9