From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 29 09:40:08 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 301DB16A4BF for ; Fri, 29 Aug 2003 09:40:08 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3400343FE0 for ; Fri, 29 Aug 2003 09:40:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7TGe6Up041541 for ; Fri, 29 Aug 2003 09:40:06 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7TGe6h6041540; Fri, 29 Aug 2003 09:40:06 -0700 (PDT) Resent-Date: Fri, 29 Aug 2003 09:40:06 -0700 (PDT) Resent-Message-Id: <200308291640.h7TGe6h6041540@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitri Goutnik Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EEBF16A4BF for ; Fri, 29 Aug 2003 09:38:24 -0700 (PDT) Received: from holmes.peterlink.ru (holmes.peterlink.ru [195.242.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7BBB43F75 for ; Fri, 29 Aug 2003 09:38:21 -0700 (PDT) (envelope-from wumpus@peterlink.ru) Received: from stapleton.peterlink.ru (stapleton.peterlink.ru [195.242.2.5]) by holmes.peterlink.ru (8.12.6/8.12.6) with ESMTP id h7TGcK3U068654 for ; Fri, 29 Aug 2003 20:38:20 +0400 (MSD) Received: from xyzzy.zzz.net (spb-2-13.dialup.peterlink.ru [195.242.17.13]) h7TGbbZT042119 for ; Fri, 29 Aug 2003 20:37:38 +0400 (MSD) Received: from xyzzy.zzz.net (localhost [127.0.0.1]) by xyzzy.zzz.net (8.12.9/8.12.9) with ESMTP id h7TGbV0w002168 for ; Fri, 29 Aug 2003 20:37:31 +0400 (MSD) (envelope-from dg@xyzzy.zzz.net) Received: (from dg@localhost) by xyzzy.zzz.net (8.12.9/8.12.9/Submit) id h7TGbVow002167; Fri, 29 Aug 2003 20:37:31 +0400 (MSD) (envelope-from dg) Message-Id: <200308291637.h7TGbVow002167@xyzzy.zzz.net> Date: Fri, 29 Aug 2003 20:37:31 +0400 (MSD) From: Dmitri Goutnik To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: conf/56144: [PATCH] /etc/rc.d/ipmon, /etc/rc.d/ipfilter fixes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dmitri Goutnik List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 16:40:08 -0000 >Number: 56144 >Category: conf >Synopsis: [PATCH] /etc/rc.d/ipmon, /etc/rc.d/ipfilter fixes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 29 09:40:05 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Dmitri Goutnik >Release: FreeBSD 5.1-CURRENT i386 >Organization: >Environment: System: FreeBSD xyzzy.zzz.net 5.1-CURRENT FreeBSD 5.1-CURRENT #9: Fri Aug 29 13:54:56 MSD 2003 root@xyzzy.zzz.net:/usr/obj/usr/src/sys/XYZZY i386 >Description: 1). /etc/rc.d/ipmon is configured to run before /etc/rc.d/ipfilter and ipmon(8) fails to start when ipfilter was built as KLD module; 2). /etc/rc.d/ipfilter always calls /sbin/ipf -E, this produces a bunch of "IP Filter: already initialized" when the kernel has ipfilter statically linked in; >How-To-Repeat: Boot. >Fix: --- ipmon.path begins here --- --- old/ipmon Fri Aug 29 15:10:44 2003 +++ ipmon Fri Aug 29 15:10:53 2003 @@ -5,7 +5,7 @@ # # PROVIDE: ipmon -# REQUIRE: mountcritlocal hostname sysctl cleanvar +# REQUIRE: mountcritlocal hostname sysctl cleanvar ipfilter # BEFORE: SERVERS # KEYWORD: FreeBSD NetBSD --- ipmon.path ends here --- --- ipfilter.path begins here --- --- old/ipfilter Fri Aug 29 12:04:18 2003 +++ ipfilter Fri Aug 29 15:19:03 2003 @@ -5,7 +5,7 @@ # # PROVIDE: ipfilter -# REQUIRE: root beforenetlkm mountcritlocal ipmon +# REQUIRE: root beforenetlkm mountcritlocal # BEFORE: netif # KEYWORD: FreeBSD NetBSD @@ -79,12 +79,15 @@ echo "Enabling ipfilter." case ${OSTYPE} in FreeBSD) - ${ipfilter_program:-/sbin/ipf} -EFa + if [ `sysctl -n net.inet.ipf.fr_running` = "0" ]; then + ${ipfilter_program:-/sbin/ipf} -E + fi + ${ipfilter_program:-/sbin/ipf} -Fa if [ -r "${ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} \ -f "${ipfilter_rules}" ${ipfilter_flags} fi - ${ipfilter_program:-/sbin/ipf} -6 -EFa + ${ipfilter_program:-/sbin/ipf} -6 -Fa if [ -r "${ipv6_ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} -6 \ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} --- ipfilter.path ends here --- >Release-Note: >Audit-Trail: >Unformatted: