aboutsummaryrefslogtreecommitdiffstats
path: root/main/arpwatch/19_all_arpwatch-2.1a15-nonewstation.patch
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2013-07-08 11:33:58 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2013-07-08 11:34:11 +0000
commit411a2782aaa756b3a8f3988763ac592cff1257b3 (patch)
treef3506a151a9b2e71ed9417f298e40f11e8d66418 /main/arpwatch/19_all_arpwatch-2.1a15-nonewstation.patch
parent0852cf7df3027cc1addd921d31c0b032983196e0 (diff)
downloadaports-411a2782aaa756b3a8f3988763ac592cff1257b3.tar.bz2
aports-411a2782aaa756b3a8f3988763ac592cff1257b3.tar.xz
main/arpwatch: added several patches for improving options and security
Diffstat (limited to 'main/arpwatch/19_all_arpwatch-2.1a15-nonewstation.patch')
-rw-r--r--main/arpwatch/19_all_arpwatch-2.1a15-nonewstation.patch100
1 files changed, 100 insertions, 0 deletions
diff --git a/main/arpwatch/19_all_arpwatch-2.1a15-nonewstation.patch b/main/arpwatch/19_all_arpwatch-2.1a15-nonewstation.patch
new file mode 100644
index 0000000000..521d31ae1b
--- /dev/null
+++ b/main/arpwatch/19_all_arpwatch-2.1a15-nonewstation.patch
@@ -0,0 +1,100 @@
+diff -Naur arpwatch-2.1a15.orig/arpwatch.8 arpwatch-2.1a15/arpwatch.8
+--- arpwatch-2.1a15.orig/arpwatch.8 2006-12-11 12:56:18.000000000 +0300
++++ arpwatch-2.1a15/arpwatch.8 2006-12-11 12:56:53.000000000 +0300
+@@ -60,6 +60,11 @@
+ .br
+ .ti +9
+ [
++.B -S
++]
++.br
++.ti +9
++[
+ .B -r
+ .I file
+ ]
+@@ -155,6 +160,10 @@
+ flag disables reporting any bogons.
+ .LP
+ The
++.B -S
++flag disables reporting of new stations.
++.LP
++The
+ .B -r
+ flag is used to specify a savefile
+ (perhaps created by
+diff -Naur arpwatch-2.1a15.orig/arpwatch.c arpwatch-2.1a15/arpwatch.c
+--- arpwatch-2.1a15.orig/arpwatch.c 2006-12-11 12:56:18.000000000 +0300
++++ arpwatch-2.1a15/arpwatch.c 2006-12-11 12:56:53.000000000 +0300
+@@ -189,6 +189,7 @@
+ "i:"
+ "n:"
+ "N"
++ "S"
+ "r:"
+ "m:"
+ "s:"
+@@ -252,6 +253,10 @@
+ ++nobogons;
+ break;
+
++ case 'S':
++ ++nonewstations;
++ break;
++
+ case 'r':
+ rfilename = optarg;
+ break;
+@@ -883,7 +888,7 @@
+ {
+ extern char version[];
+ char usage[] =
+- "[-dN] "
++ "[-dNS] "
+ "[-f datafile] "
+ "[-i interface] "
+ "[-n net[/width]] "
+@@ -894,7 +899,7 @@
+ "[-a] "
+ "[-u username] "
+ "[-R seconds ] "
+- "[-Q ] "
++ "[-Q] "
+ "[-z ignorenet/ignoremask] "
+ "\n"
+ ;
+diff -Naur arpwatch-2.1a15.orig/arpwatch.h arpwatch-2.1a15/arpwatch.h
+--- arpwatch-2.1a15.orig/arpwatch.h 2006-12-11 12:56:18.000000000 +0300
++++ arpwatch-2.1a15/arpwatch.h 2006-12-11 12:57:13.000000000 +0300
+@@ -16,6 +16,8 @@
+
+ extern char *prog;
+
++extern int nonewstations; /* Turns off new-station reporting. */
++
+ #ifdef ETHER_HEADER_HAS_EA
+ #define ESRC(ep) ((ep)->ether_shost.ether_addr_octet)
+ #define EDST(ep) ((ep)->ether_dhost.ether_addr_octet)
+diff -Naur arpwatch-2.1a15.orig/db.c arpwatch-2.1a15/db.c
+--- arpwatch-2.1a15.orig/db.c 2006-12-11 12:56:18.000000000 +0300
++++ arpwatch-2.1a15/db.c 2006-12-11 12:57:34.000000000 +0300
+@@ -86,6 +86,8 @@
+ static void check_hname(struct ainfo *);
+ struct ainfo *newainfo(void);
+
++int nonewstations = 0;
++
+ int
+ ent_add(register u_int32_t a, register u_char *e, time_t t, register char *h,
+ char *interface)
+@@ -118,7 +120,8 @@
+ if (ap->ecount == 0) {
+ ap->ecount = 1;
+ ap->elist[0] = elist_alloc(a, e, t, h, interface);
+- report("new station", a, e, NULL, &t, NULL, interface);
++ if (!nonewstations)
++ report("new station", a, e, NULL, &t, NULL, interface);
+ return (1);
+ }
+