From owner-freebsd-bugs Thu May 3 16:10:18 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6E06237B443 for ; Thu, 3 May 2001 16:10:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f43NA4G03825; Thu, 3 May 2001 16:10:04 -0700 (PDT) (envelope-from gnats) Received: from skippyii.compar.com (mail.compar.com [216.208.38.130]) by hub.freebsd.org (Postfix) with ESMTP id 5537437B422 for ; Thu, 3 May 2001 16:04:24 -0700 (PDT) (envelope-from root@gabby.gsicomp.on.ca) Received: from gabby.gsicomp.on.ca (HSE-Toronto-ppp213450.sympatico.ca [64.228.153.241]) by skippyii.compar.com (8.11.3/8.11.3) with ESMTP id f43N9O251928 for ; Thu, 3 May 2001 19:09:24 -0400 (EDT) (envelope-from root@gabby.gsicomp.on.ca) Received: (from root@localhost) by gabby.gsicomp.on.ca (8.11.1/8.9.3) id f43MveN45424; Thu, 3 May 2001 18:57:40 -0400 (EDT) (envelope-from root) Message-Id: <200105032257.f43MveN45424@gabby.gsicomp.on.ca> Date: Thu, 3 May 2001 18:57:40 -0400 (EDT) From: matt@gsicomp.on.ca Reply-To: matt@gsicomp.on.ca To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/27069: Add ppp delay ability in rc.network Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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