Subject: misc/12300: /etc/rc.d/ipfilter: add resync command
To: None <gnats-bugs@gnats.netbsd.org>
From: Johnny C. Lam <lamj@stat.cmu.edu>
List: netbsd-bugs
Date: 02/28/2001 09:17:35
>Number:         12300
>Category:       misc
>Synopsis:       /etc/rc.d/ipfilter: add resync command
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 28 06:18:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Johnny C. Lam
>Release:        NetBSD-current from 20010206
>Organization:
	William Lam & Co., Inc.
>Environment:
System: NetBSD hobbes.home.net 1.5S NetBSD 1.5S (HOBBES) #0: Mon Feb 26 10:34:29 EST 2001 jlam@hobbes.home.net:/usr/obj/usr/src/sys/arch/i386/compile/HOBBES i386
Architecture: i386
Machine: i386
>Description:
	It'd be nice if the /etc/rc.d/ipfilter run control script had a
	descriptive command that mapped to "/sbin/ipf -y" to resync the
	interface list.

>How-To-Repeat:
	N/A
>Fix:
	
--- ipfilter.orig	Wed Feb 28 09:02:56 2001
+++ ipfilter
@@ -18,7 +18,8 @@
 reload_cmd="ipfilter_reload"
 status_precmd="$stop_precmd"
 status_cmd="ipfilter_status"
-extra_commands="reload status"
+resync_cmd="ipfilter_resync"
+extra_commands="reload status resync"
 
 ipfilter_prestart()
 {
@@ -73,6 +74,12 @@
 ipfilter_status()
 {
 	/sbin/ipf -V
+}
+
+ipfilter_resync()
+{
+	echo "Resyncing ipfilter interface list."
+	/sbin/ipf -y
 }
 
 load_rc_config $name
>Release-Note:
>Audit-Trail:
>Unformatted: