Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 May 2001 18:57:40 -0400 (EDT)
From:      matt@gsicomp.on.ca
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/27069: Add ppp delay ability in rc.network
Message-ID:  <200105032257.f43MveN45424@gabby.gsicomp.on.ca>

next in thread | raw e-mail | index | archive | help

>Number:         27069
>Category:       bin
>Synopsis:       ppp links may not be up before natd is started, causing natd to fail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 03 16:10:03 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Matt Emmerton
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
GSI Computer Services
>Environment:

gabby.gsicomp.on.ca 4.3-RC FreeBSD 4.3-RC #1: Wed Apr 11 00:54:11 EDT 2001

>Description:

	In certain situations, /sbin/natd must be used instead of ppp's built-in
	nat.  If a ppp link is being started from rc.network (via ppp_enable),
	it may not be up and have IPs assigned before natd is started.  This
	causes natd to abort, and forces an admin to start natd by hand.

	This is especially important for PPPoE links, which are usually up
	quick enough to not cause this problem, but the odd time can be slow
	and cause this problem to manifest.

>How-To-Repeat:

	Configure rc.conf with a ppp link (ppp_enable, ppp_mode, ppp_profile)
	Enable NAT with natd_interface=tun0.

	When the machine is booted, if the ppp link is slow to init, then natd
	will fail to initialize.

>Fix:

Add a parameter called ppp_delay, which is set to an appropriate delay.
This will allow ppp to fully init the interface before natd is started.

Suggested value of ppp_delay for etc/defaults/rc.conf: 5 seconds?
(Adequate for PPPoE links, would need to be upped to 30/45/60 for dialup)

--- etc/rc.network.orig	Thu May  3 18:43:36 2001
+++ etc/rc.network	Thu May  3 18:43:25 2001
@@ -161,6 +161,10 @@
 		esac
 
 		echo -n 'Starting ppp: '; ppp ${ppp_command} -quiet ${ppp_profile}
+
+		if [ "x${ppp_delay}" != "x" ]; then
+			sleep ${ppp_delay}
+		fi
 		;;
 	esac
 
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105032257.f43MveN45424>