*** ./Makefile.orig Fri Aug 21 09:36:39 2015 --- ./Makefile Fri Aug 21 10:00:05 2015 *************** *** 3,9 **** PORTNAME= arpwatch DISTVERSION= 2.1a15 ! PORTREVISION= 8 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.ee.lbl.gov/ \ GENTOO --- 3,9 ---- PORTNAME= arpwatch DISTVERSION= 2.1a15 ! PORTREVISION= 9 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.ee.lbl.gov/ \ GENTOO *************** *** 13,18 **** --- 13,22 ---- LICENSE= BSD3CLAUSE + OPTIONS_DEFINE= NOVRRP + NOVRRP_DESC= Ignore VRRP/CARP traffic + NOVRRP_CFLAGS= -DNOVRRP + GNU_CONFIGURE= yes CONFIGURE_ARGS= --quiet INSTALL_TARGET= install install-man *** ./files/patch-arpwatch.c.orig Fri Aug 21 09:39:39 2015 --- ./files/patch-arpwatch.c Fri Aug 21 09:55:04 2015 *************** *** 1,5 **** ! --- arpwatch.c.orig Thu Jan 22 17:18:20 2004 ! +++ arpwatch.c Thu Jul 20 12:30:08 2006 @@ -107,6 +107,8 @@ char *prog; --- 1,5 ---- ! --- arpwatch.c.orig 2004-01-22 16:18:20.000000000 -0600 ! +++ arpwatch.c 2015-08-21 09:53:43.951394266 -0500 @@ -107,6 +107,8 @@ char *prog; *************** *** 37,43 **** if (rfilename == NULL) { (void)setsignal(SIGQUIT, checkpoint); (void)setsignal(SIGALRM, checkpoint); ! @@ -751,6 +756,6 @@ (void)fprintf(stderr, "Version %s\n", version); (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]" --- 37,64 ---- if (rfilename == NULL) { (void)setsignal(SIGQUIT, checkpoint); (void)setsignal(SIGALRM, checkpoint); ! @@ -391,11 +396,20 @@ ! return; ! } ! ! +#ifdef NOVRRP ! + /* Check for CARP-generated ARP replies and ignore them */ ! + if (MEMCMP(sha, vrrp_prefix, 5) == 0) { ! + /* do nothing */ ! + } else { ! +#endif ! /* Double check ethernet addresses */ ! if (MEMCMP(sea, sha, 6) != 0) { ! dosyslog(LOG_INFO, "ethernet mismatch", sia, sea, sha); ! return; ! } ! +#ifdef NOVRRP ! + } ! +#endif ! ! /* Got a live one */ ! t = h->ts.tv_sec; ! @@ -751,6 +765,6 @@ (void)fprintf(stderr, "Version %s\n", version); (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]" *** ./files/patch-util.c.orig Fri Aug 21 09:58:03 2015 --- ./files/patch-util.c Fri Aug 21 09:54:38 2015 *************** *** 0 **** --- 1,12 ---- + --- util.c.orig 2015-08-21 09:46:09.625425841 -0500 + +++ util.c 2015-08-21 09:49:31.746412058 -0500 + @@ -59,6 +59,9 @@ + 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 initializing = 1; /* true if initializing */ + *** ./files/patch-util.h.orig Fri Aug 21 09:58:05 2015 --- ./files/patch-util.h Fri Aug 21 09:56:43 2015 *************** *** 0 **** --- 1,10 ---- + --- util.h.orig 2015-08-21 09:56:04.761384561 -0500 + +++ util.h 2015-08-21 09:56:25.785382941 -0500 + @@ -14,6 +14,7 @@ + + extern u_char zero[6]; + extern u_char allones[6]; + +extern u_char vrrp_prefix[5]; + + extern int debug; + extern int initializing;