rpms/arpwatch/devel arpwatch-2.1a15-bogon.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 arpwatch.init, 1.2, 1.3 arpwatch.spec, 1.4, 1.5 sources, 1.3, 1.4

Miroslav Lichvar (mlichvar) fedora-extras-commits at redhat.com
Thu Aug 9 12:55:01 UTC 2007


Author: mlichvar

Update of /cvs/pkgs/rpms/arpwatch/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11004

Modified Files:
	.cvsignore arpwatch.init arpwatch.spec sources 
Added Files:
	arpwatch-2.1a15-bogon.patch 
Log Message:
- improve init script (#246869)
- allow -n 0/32 to disable reporting bogons from 0.0.0.0 (#244606)
- update license tag
- update ethercodes.dat


arpwatch-2.1a15-bogon.patch:

--- NEW FILE arpwatch-2.1a15-bogon.patch ---
--- arpwatch-2.1a15/arpwatch.c.bogon	2007-08-09 13:53:47.000000000 +0200
+++ arpwatch-2.1a15/arpwatch.c	2007-08-09 13:58:17.000000000 +0200
@@ -730,11 +730,12 @@ addnet(register const char *str)
 
 	/* XXX hack */
 	n = ntohl(inet_addr(tstr));
-	while ((n & 0xff000000) == 0) {
-		n <<= 8;
-		if (n == 0)
-			return (0);
-	}
+	if (n || width != 32)
+		while ((n & 0xff000000) == 0) {
+			n <<= 8;
+			if (n == 0)
+				return (0);
+		}
 	n = htonl(n);
 
 	if (width != 0) {


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/arpwatch/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	13 Jun 2007 08:56:55 -0000	1.3
+++ .cvsignore	9 Aug 2007 12:54:29 -0000	1.4
@@ -1,2 +1,2 @@
 arpwatch-2.1a15.tar.gz
-ethercodes-20070613.dat
+ethercodes-20070809.dat


Index: arpwatch.init
===================================================================
RCS file: /cvs/pkgs/rpms/arpwatch/devel/arpwatch.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- arpwatch.init	24 May 2007 14:14:48 -0000	1.2
+++ arpwatch.init	9 Aug 2007 12:54:29 -0000	1.3
@@ -1,10 +1,21 @@
-#! /bin/sh
+#!/bin/bash
 #
 # chkconfig: - 55 45
 # description:	The arpwatch daemon attempts to keep track of ethernet/ip \
 #		address pairings.
 # processname: arpwatch
 
+### BEGIN INIT INFO
+# Provides: arpwatch
+# Required-Start: $network $local_fs $remote_fs
+# Required-Stop: $network $local_fs $remote_fs
+# Should-Start: $syslog $named
+# Should-Stop: $syslog $named
+# Short-Description: start and stop arpwatch
+# Description: The arpwatch daemon attempts to keep track of ethernet/ip
+#              address pairings.
+### END INIT INFO
+
 # Source function library.
 . /etc/rc.d/init.d/functions
 
@@ -15,33 +26,32 @@
 	. /etc/sysconfig/arpwatch
 fi
 
-RETVAL=0
-prog="arpwatch"
+prog=arpwatch
+lockfile=/var/lock/subsys/$prog
 
 start () {
 	# Check that networking is up.
 	[ "$NETWORKING" = "no" ] && exit 1
 
+	status $prog > /dev/null && return 0
+
 	echo -n $"Starting $prog: "
-	daemon arpwatch $OPTIONS
+	daemon $prog $OPTIONS
 	RETVAL=$?
 	echo
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/arpwatch
+	[ $RETVAL -eq 0 ] && touch $lockfile
+	return $RETVAL
 }
+
 stop () {
 	echo -n $"Stopping $prog: "
-	killproc arpwatch
+	killproc $prog
 	RETVAL=$?
 	echo
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/arpwatch
+	[ $RETVAL -eq 0 ] && rm -f $lockfile
+	return $RETVAL
 }
 
-restart () {
-        stop
-        start
-}
-
-
 # See how we were called.
 case "$1" in
   start)
@@ -51,18 +61,22 @@
 	stop
 	;;
   status)
-	status arpwatch
-	RETVAL=$?
+	status $prog
 	;;
-  restart|reload)
-	restart
+  restart|force-reload)
+	stop
+	start
 	;;
-  condrestart)
-	[ -f /var/lock/subsys/arpwatch ] && restart || :
+  try-restart|condrestart)
+	if status $prog > /dev/null; then
+	    stop
+	    start
+	fi
+	;;
+  reload)
+	exit 3
 	;;
   *)
-	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
-	RETVAL=3
+	echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
+	exit 2
 esac
-
-exit $RETVAL


Index: arpwatch.spec
===================================================================
RCS file: /cvs/pkgs/rpms/arpwatch/devel/arpwatch.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- arpwatch.spec	13 Jun 2007 08:56:55 -0000	1.4
+++ arpwatch.spec	9 Aug 2007 12:54:29 -0000	1.5
@@ -3,10 +3,10 @@
 Name: arpwatch
 Epoch: 14
 Version: 2.1a15
-Release: 5%{?dist}
+Release: 6%{?dist}
 Summary: Network monitoring tools for tracking IP addresses on a network
 Group: Applications/System
-License: BSD
+License: BSD with advertising
 URL: http://ee.lbl.gov/
 Requires(pre): shadow-utils 
 Requires(post): /sbin/chkconfig
@@ -19,7 +19,7 @@
 Source0: ftp://ftp.ee.lbl.gov/arpwatch-%{version}.tar.gz
 Source1: arpwatch.init
 Source2: arpwatch.sysconfig
-Source3: ethercodes-20070613.dat
+Source3: ethercodes-20070809.dat
 Patch1: arpwatch-2.1a4-fhs.patch
 Patch2: arpwatch-2.1a10-man.patch
 Patch3: arpwatch-drop.patch
@@ -28,6 +28,7 @@
 Patch6: arpwatch-dir-man.patch
 Patch7: arpwatch-scripts.patch
 Patch8: arpwatch-2.1a15-nolocalpcap.patch
+Patch9: arpwatch-2.1a15-bogon.patch
 
 %description
 The arpwatch package contains arpwatch and arpsnmp.  Arpwatch and
@@ -50,6 +51,7 @@
 %patch6 -p1 -b .dirman
 %patch7 -p1 -b .scripts
 %patch8 -p1 -b .nolocalpcap
+%patch9 -p1 -b .bogon
 
 %build
 %configure
@@ -139,6 +141,12 @@
 %verify(not md5 size mtime) %config %{_vararpwatch}/ethercodes.dat
 
 %changelog
+* Thu Aug 09 2007 Miroslav Lichvar <mlichvar at redhat.com> 14:2.1a15-6
+- improve init script (#246869)
+- allow -n 0/32 to disable reporting bogons from 0.0.0.0 (#244606)
+- update license tag
+- update ethercodes.dat
+
 * Wed Jun 13 2007 Miroslav Lichvar <mlichvar at redhat.com> 14:2.1a15-5
 - update ethercodes.dat
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/arpwatch/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	13 Jun 2007 08:56:55 -0000	1.3
+++ sources	9 Aug 2007 12:54:29 -0000	1.4
@@ -1,2 +1,2 @@
 cebfeb99c4a7c2a6cee2564770415fe7  arpwatch-2.1a15.tar.gz
-5801cd4a047f50a97c18da36b5fbc6fe  ethercodes-20070613.dat
+83fab2029fce5c50539f1c3eb548f799  ethercodes-20070809.dat




More information about the fedora-extras-commits mailing list