summaryrefslogtreecommitdiff
path: root/net/arpwatch
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2000-06-09 09:06:55 +0000
committerbouyer <bouyer@pkgsrc.org>2000-06-09 09:06:55 +0000
commitc37f18c0924a4e4d575f4a7dfec197c8d62c3549 (patch)
tree806517acc68e45483d506ef5b850badce663cb45 /net/arpwatch
parent2ea4f72f9792b550719edb9c59017b16028a2e03 (diff)
downloadpkgsrc-c37f18c0924a4e4d575f4a7dfec197c8d62c3549.tar.gz
Add a '-a' flag, wich prevents arp traffic from being matched against the local
net before processing. Usefull if you don't want to have an IP addr on the listening interface, or if you have aliases in different nets. While I'm there correct a bogon in the man page.
Diffstat (limited to 'net/arpwatch')
-rw-r--r--net/arpwatch/patches/patch-aa52
-rw-r--r--net/arpwatch/patches/patch-ae53
2 files changed, 98 insertions, 7 deletions
diff --git a/net/arpwatch/patches/patch-aa b/net/arpwatch/patches/patch-aa
index 199f320d03c..03e1ab6aa3e 100644
--- a/net/arpwatch/patches/patch-aa
+++ b/net/arpwatch/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.2 1998/08/07 11:10:36 agc Exp $
+$NetBSD: patch-aa,v 1.3 2000/06/09 09:06:55 bouyer Exp $
---- arpwatch.8.orig Mon Apr 27 19:10:59 1998
-+++ arpwatch.8 Mon Apr 27 19:11:47 1998
-@@ -59,7 +59,7 @@
+--- arpsnmp.8.orig Mon Apr 27 19:11:09 1998
++++ arpsnmp.8 Mon Apr 27 19:12:05 1998
+@@ -55,7 +55,7 @@
.na
.nh
.nf
@@ -11,9 +11,47 @@ $NetBSD: patch-aa,v 1.2 1998/08/07 11:10:36 agc Exp $
arp.dat - ethernet/ip address database
ethercodes.dat - vendor ethernet block list
.ad
---- arpsnmp.8.orig Mon Apr 27 19:11:09 1998
-+++ arpsnmp.8 Mon Apr 27 19:12:05 1998
-@@ -55,7 +55,7 @@
+
+--- arpwatch.8.orig Fri Oct 31 21:02:27 1997
++++ arpwatch.8 Fri Jun 9 10:00:29 2000
+@@ -19,13 +19,7 @@
+ .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ .\"
+-.TH ARPSNMP 8 "31 October 1997"
+-.UC 4
+-.SH NAME
+-arpsnmp - keep track of ethernet/ip address pairings
+-.SH SYNOPSIS
+-.B arpsnmp
+-[
++.TH ARPWATCH 8 "31 October 1997"
+ .UC 4
+ .SH NAME
+ arpwatch - keep track of ethernet/ip address pairings
+@@ -33,6 +27,8 @@
+ .na
+ .B arpwatch
+ [
++.B -a
++] [
+ .B -d
+ ] [
+ .B -f
+@@ -58,6 +54,12 @@
+ to listen for arp packets on a local ethernet interface.
+ .LP
+ The
++.B -a
++flag supress check for local network. By default, arp traffic for IP addresses
++which don't belong to the local network are logged as bogons, and not added
++to the database.
++.LP
++The
+ .B -d
+ flag is used enable debugging. This also inhibits forking into the
+ background and emailing the reports. Instead, they are sent to
+@@ -120,7 +122,7 @@
.na
.nh
.nf
diff --git a/net/arpwatch/patches/patch-ae b/net/arpwatch/patches/patch-ae
new file mode 100644
index 00000000000..2d32883451d
--- /dev/null
+++ b/net/arpwatch/patches/patch-ae
@@ -0,0 +1,53 @@
+$NetBSD: patch-ae,v 1.1 2000/06/09 09:06:56 bouyer Exp $
+
+--- arpwatch.c.orig Fri Jun 9 09:51:11 2000
++++ arpwatch.c Fri Jun 9 09:54:14 2000
+@@ -119,6 +119,7 @@
+ extern int optind;
+ extern int opterr;
+ extern char *optarg;
++int aflag = 0;
+
+ int
+ main(int argc, char **argv)
+@@ -147,9 +148,12 @@
+ interface = NULL;
+ rfilename = NULL;
+ pd = NULL;
+- while ((op = getopt(argc, argv, "df:i:r:")) != EOF)
++ while ((op = getopt(argc, argv, "adf:i:r:")) != EOF)
+ switch (op) {
+
++ case 'a':
++ aflag++;
++ break;
+ case 'd':
+ ++debug;
+ #ifndef DEBUG
+@@ -340,7 +344,7 @@
+ BCOPY(SPA(ea), &sia, 4);
+
+ /* Watch for bogons */
+- if ((sia & netmask) != net) {
++ if (aflag == 0 && (sia & netmask) != net) {
+ dosyslog(LOG_INFO, "bogon", sia, sea, sha);
+ return;
+ }
+@@ -489,7 +493,7 @@
+ BCOPY(SPA(ea), &sia, 4);
+
+ /* Watch for bogons */
+- if ((sia & netmask) != net) {
++ if (aflag == 0 && (sia & netmask) != net) {
+ dosyslog(LOG_INFO, "bogon", sia, sea, sha);
+ return;
+ }
+@@ -623,6 +627,7 @@
+
+ (void)fprintf(stderr, "Version %s\n", version);
+ (void)fprintf(stderr,
+- "usage: %s [-d] [-f datafile] [-i interface] [-r file]\n", prog);
++ "usage: %s [-a] [-d] [-f datafile] [-i interface] [-r file]\n",
++ prog);
+ exit(1);
+ }