From nectar@bone.nectar.com  Sun Jun 14 08:48:41 1998
Received: from bone.nectar.com (bone.nectar.com [204.27.67.93])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA17196
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 14 Jun 1998 08:48:40 -0700 (PDT)
          (envelope-from nectar@bone.nectar.com)
Received: (from nectar@localhost)
	by bone.nectar.com (8.9.0/8.9.0) id KAA26715;
	Sun, 14 Jun 1998 10:48:09 -0500 (CDT)
Message-Id: <199806141548.KAA26715@bone.nectar.com>
Date: Sun, 14 Jun 1998 10:48:09 -0500 (CDT)
From: n@nectar.com
Reply-To: n@nectar.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: natd support in rc.network broken
X-Send-Pr-Version: 3.2

>Number:         6946
>Category:       conf
>Synopsis:       natd support in rc.network broken
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 14 08:50:00 PDT 1998
>Closed-Date:    Sun Jun 14 09:28:23 PDT 1998
>Last-Modified:  Sun Jun 14 09:31:35 PDT 1998
>Originator:     Jacques Vidrine
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

	3.0-CURRENT since 1998/04/12

>Description:

	The rc.network script contains an invalid test (starts with
	``-a'') that causes an error when natd is enabled in rc.conf,
	and fails to actually start natd.

	This error was introduced by revision 1.22.  It appears that
	the original submitter's ``Fix'' was correct, but that the
	committer munged the ``Fix'' a bit in an effort to bring 
	the line length down.

>How-To-Repeat:

	Enable natd in rc.conf, and then boot into multiuser mode.
	Watch for the ``[: syntax error'' message, and note that
	natd didn't get run.

>Fix:
	
--- /usr/src/etc/rc.network     Mon May 18 23:36:31 1998
+++ /tmp/rc.network     Sun Jun 14 10:47:02 1998
@@ -269,10 +269,9 @@
     fi

     # Network Address Translation daemon
-    if [ "X${natd_enable}" = X"YES" -a "X${natd_interface}" != X"" ]; then
-           if [ -a "X${firewall_enable}" = X"YES" ]; then
-                   echo -n ' natd'; natd ${natd_flags} -n ${natd_interface}
-           fi
+    if [ "X${natd_enable}" = X"YES" -a "X${natd_interface}" != X"" \
+       -a "X${firewall_enable}" = X"YES" ]; then
+           echo -n ' natd'; natd ${natd_flags} -n ${natd_interface}
     fi

     echo '.'  	

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Jun 14 09:28:23 PDT 1998 
State-Changed-Why:  
Patch committed in rev 1.27 of src/etc/rc.network.  Thanks! 
>Unformatted:
