Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make -d and -v actually work, modify pfSense UI #630

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion net-mgmt/arpwatch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= arpwatch
DISTVERSION= 2.1a15
PORTREVISION= 10
PORTREVISION= 11
CATEGORIES= net-mgmt
MASTER_SITES= ftp://ftp.ee.lbl.gov/ \
GENTOO
Expand Down
17 changes: 4 additions & 13 deletions net-mgmt/arpwatch/files/patch-Makefile.in
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
18 changes: 9 additions & 9 deletions net-mgmt/arpwatch/files/patch-arpwatch.c
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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;

Expand All @@ -35,15 +35,15 @@
default:
usage();
}
@@ -321,7 +333,6 @@ main(int argc, char **argv)
@@ -321,7 +333,6 @@

(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
@@ -391,6 +402,12 @@
return;
}

Expand All @@ -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]"
Expand Down
2 changes: 1 addition & 1 deletion net-mgmt/pfSense-pkg-arpwatch/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
<size>50</size>
<required/>
</field>
<field>
<fielddescr>Disable CARP/VRRP</fielddescr>
<fieldname>disable_carp</fieldname>
<type>checkbox</type>
<description>Disables reporting CARP/VRRP ethernet prefixes.</description>
</field>
<field>
<fielddescr>Disable bogons</fielddescr>
<fieldname>disable_bogons</fieldname>
Expand Down