From owner-freebsd-current@FreeBSD.ORG Sun May 11 19:23:17 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B685DAB2; Sun, 11 May 2014 19:23:17 +0000 (UTC) Received: from mail-qa0-x22c.google.com (mail-qa0-x22c.google.com [IPv6:2607:f8b0:400d:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65B2F2CEF; Sun, 11 May 2014 19:23:17 +0000 (UTC) Received: by mail-qa0-f44.google.com with SMTP id j7so6351482qaq.31 for ; Sun, 11 May 2014 12:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Gp0KtGjtZ+7D1ssALkeEMTkf8hPrE9xTXLc8hDF/yGQ=; b=pPaATQFEonAQ0YkqYl93obRuVmZQu54XpizNNmBIIYzPz96JRiSxt700/k/gW36m9p /8LkBBpJkxxzZXk9M+KTyTfeMqy46lORbLJknwsHYKh16EinGEbP3ZqLwHDjRwcTqbV1 S3cspOjv6tan69xunG24HnXtwitaX0cPOC4zi0XOJipi6lBKRt9QypU14WlxUrgC9dbb 7xB/i59UB7MGvNwqo1F1uPUeBPDZaxSHLXSUnCZTAuDjd8WTa4LQhKnGD45PzouhqjsA oonA9+efu+NSxUzrKmjb5DyMqQjhPr8wIOMSZ3ls1rK2n4p7SMZ7Iy50OfgVGyOjg9Hc S/IA== MIME-Version: 1.0 X-Received: by 10.224.129.66 with SMTP id n2mr32461729qas.55.1399836196543; Sun, 11 May 2014 12:23:16 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.191.201 with HTTP; Sun, 11 May 2014 12:23:16 -0700 (PDT) In-Reply-To: References: Date: Sun, 11 May 2014 12:23:16 -0700 X-Google-Sender-Auth: y990pda7hRN1nNlm7QdwC3EqYvs Message-ID: Subject: Re: Ordering for network-sensitive rc scripts From: Adrian Chadd To: David Chisnall Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "FreeBSD-CURRENT@freebsd.org Current" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 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: Sun, 11 May 2014 19:23:17 -0000 On 11 May 2014 12:01, David Chisnall wrote: > On 17 Apr 2014, at 09:30, Adrian Chadd wrote: > >> Can't we add a devd hook to do that? > > I tried doing this, but it turns out that wlan devices don't appear to se= nd devd LINK_UP / LINK_DOWN events. It would be nice to have a clean solut= ion to this. By default, using the stock rc scripts, my router is currentl= y not able to forward packets from the WiFi until I've logged into it and m= anually run 'service pf restart', which is a bit crazy. I've hacked around= it by having a script run from rc.local that sleeps for 60 seconds and the= n restarts a few things, but that's really, really ugly. > > On closer inspection, pf doesn't fail silently, it complains about a synt= ax error in my config file because wlan0 is not a known interface. > > We therefore have an rc ordering problem if you want to use pf and WiFi a= t the same time. This problem was introduced some time between 9.2 and 10.= 0. Is there a PR for this? It's the first I've heard of it. -a