Bug 6946 - natd support in rc.network broken
Summary: natd support in rc.network broken
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 3.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-06-14 16:50 UTC by Jacques Vidrine
Modified: 1998-06-14 17:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacques Vidrine 1998-06-14 16:50:00 UTC
	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.

Fix: 

# 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 '.'--lvvCyybsrN66t8XF9ncall7tQfWl42f6x24RgIiRaDZfQYLW
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- /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
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.
Comment 1 Steve Price freebsd_committer freebsd_triage 1998-06-14 17:28:23 UTC
State Changed
From-To: open->closed

Patch committed in rev 1.27 of src/etc/rc.network.  Thanks!