From mokr@amber.mokr.ru  Sat Oct 19 15:00:27 2002
Return-Path: <mokr@amber.mokr.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 93B3137B404
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Oct 2002 15:00:27 -0700 (PDT)
Received: from guardian.sch.ru (TCH-MSU.ATM6-0.181.M9-R1.msu.net [212.16.0.250])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8DA5743E9C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Oct 2002 15:00:25 -0700 (PDT)
	(envelope-from mokr@amber.mokr.ru)
Received: from amber.mokr.ru ([172.16.0.6])
	by guardian.sch.ru (8.12.6/8.12.6/20021009101427) with ESMTP id g9JM0OeA045091
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Oct 2002 02:00:24 +0400 (MSD)
	(envelope-from mokr@amber.mokr.ru)
Received: from amber.mokr.ru (localhost [127.0.0.1])
	by amber.mokr.ru (8.12.6/8.12.6/020822) with ESMTP id g9JLxrCA001055
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Oct 2002 02:00:24 +0400 (MSD)
	(envelope-from mokr@amber.mokr.ru)
Received: (from mokr@localhost)
	by amber.mokr.ru (8.12.6/8.12.6/Submit) id g9JLxrYE001054;
	Sun, 20 Oct 2002 01:59:53 +0400 (MSD)
Message-Id: <200210192159.g9JLxrYE001054@amber.mokr.ru>
Date: Sun, 20 Oct 2002 01:59:53 +0400 (MSD)
From: Sergey Mokryshev <mokr@mokr.net>
Reply-To: Sergey Mokryshev <mokr@mokr.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /etc/rc.d/ipnat does not properly call 'err' in absense of ipfilter module
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         44284
>Category:       misc
>Synopsis:       /etc/rc.d/ipnat does not properly call 'err' in absense of ipfilter module
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 19 15:10:01 PDT 2002
>Closed-Date:    Fri Oct 25 17:19:22 PDT 2002
>Last-Modified:  Fri Oct 25 17:19:22 PDT 2002
>Originator:     Sergey Mokryshev
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Tersys
>Environment:
System: FreeBSD amber.mokr.net 5.0-CURRENT FreeBSD 5.0-CURRENT #12: Sun Oct 20 00:40:36 MSD 2002 su@amber.mokr.net:/.1/a/obj/.1/a/src/sys/AMBER_UP i386


>Description:
	/etc/rc.d/ipnat miss first argument (error code) while calling 
	'err' routine from /etc/rc.subr

>How-To-Repeat:
	echo 'ipfilter_enable="NO"' >>/etc/rc.conf
	echo 'ipnat_enable="YES"' >>/etc/rc.conf
	(remove options IPFILTER from kernel configuration if it is there and recompile kernel)
	reboot
	examine console output, there should be

	Oct 20 01:05:11 amber kernel: /etc/rc: ERROR:
	Oct 20 01:05:11 amber kernel: exit: Illegal number: ipnat

>Fix:

--- /tmp/ipnat.orig	Sun Oct 20 01:29:50 2002
+++ ipnat	Sun Oct 20 01:32:55 2002
@@ -36,8 +36,7 @@
 {
 	# Make sure ipfilter is loaded before continuing
 	if ! ${SYSCTL} net.inet.ipf.fr_pass >/dev/null 2>&1; then
-		err 'ipnat requires ipfilter be loaded'
-		return 1
+		err 1 'ipnat requires ipfilter be loaded'
 	fi
 	return 0
 }
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: fenner 
State-Changed-When: Fri Oct 25 17:19:15 PDT 2002 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44284 
>Unformatted:
