From owner-freebsd-current@FreeBSD.ORG Tue Jun 8 19:48:57 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B287C16A4CE for ; Tue, 8 Jun 2004 19:48:57 +0000 (GMT) Received: from mail009.syd.optusnet.com.au (mail009.syd.optusnet.com.au [211.29.132.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id C151043D39 for ; Tue, 8 Jun 2004 19:48:56 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) i58Jmpm22036; Wed, 9 Jun 2004 05:48:51 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])i58JmpVd026090; Wed, 9 Jun 2004 05:48:51 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)i58Jmpn7026089; Wed, 9 Jun 2004 05:48:51 +1000 (EST) (envelope-from pjeremy) Date: Wed, 9 Jun 2004 05:48:51 +1000 From: Peter Jeremy To: Jonathan Weiss Message-ID: <20040608194851.GD1596@cirb503493.alcatel.com.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i cc: current@freebsd.org Subject: Re: Loading the PF ruleset fails due to ppp X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2004 19:48:57 -0000 On Sun, 2004-Jun-06 12:46:09 +0200, Jonathan Weiss wrote: >The problem is, that ppp is not fast enough for PF. PF is starting up before >ppp gets an IP for tun0, so loading the ruleset fails. While using the >PF-port, the time lag between starting ppp and PF was big enough, as PF was >started whith the other third-party tools. With PF now in the basesystem, it >is too fast for ppp. ... >Could we add the "sleep 10" or maybe a "sleep 5" in this function? I'm sure >when current become 5.3 I'll be not alone with my problem. I disagree with this "solution". Whilst a 5 or 10 second sleep may work for you today, it may not work tomorrow (when your ISP's servers are a bit busier). It is unlikely to be appropriate for everyone. It shouldn't be too difficult to force the rc.d scripts to synchronise to the PPP link: 1) Create a "ppp.linkup" that creates a flag file somewhere 2) Create a rc.d script with "after ppp, before pf" (or whatever) that waits for the flag file to appear (and then deletes it): until [ -f /flag/file ] ; do sleep 1 ; done (add error checking to suit) -- Peter Jeremy