From owner-freebsd-rc@FreeBSD.ORG Thu Sep 22 01:31:07 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7AFE1065670; Thu, 22 Sep 2011 01:31:07 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9978FC0A; Thu, 22 Sep 2011 01:31:07 +0000 (UTC) Received: by qyk10 with SMTP id 10so5710317qyk.13 for ; Wed, 21 Sep 2011 18:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=SWpV6uFH0dIBNiZtNF/JUU+tB5Db2ZBbHEIxnpVSAjo=; b=vkoOt6kwDFhrKNeMw8zw+CO45yH/r1bl2yzvDXEzeB9mjm5rbpMMTlYi6Gpv0Gg16X sTBBVhLNvJXWS1S3x0j3Gvs8mwvk6LDnC4vEb9SG1HCQC1av/hqxo1NMAY5irDz6fgSH 5S/fwnn+4ZsbrqPrwJ8WvfWbYulx40xlTLpR4= MIME-Version: 1.0 Received: by 10.224.215.133 with SMTP id he5mr1262533qab.224.1316653723663; Wed, 21 Sep 2011 18:08:43 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Wed, 21 Sep 2011 18:08:43 -0700 (PDT) In-Reply-To: <4E7A75EB.80308@delphij.net> References: <4E7A75EB.80308@delphij.net> Date: Wed, 21 Sep 2011 18:08:43 -0700 Message-ID: From: Garrett Cooper To: d@delphij.net Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-rc@freebsd.org Subject: Re: [RFC] Use noafif in dhcpif and sycndhcpif X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2011 01:31:07 -0000 On Wed, Sep 21, 2011 at 4:40 PM, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Hi, > > While developing FreeNAS we have hit a problem -- when > ifconfig_DEFAULT is set to "DHCP", all interfaces including pfsync0 > and pflog0 would be probed by dhclient. > > It seems to be reasonable to check noafif in both dhcpif and > syncdhcpif, as did in ipv6_autoconfif based on same reasoning. The problem, as I've noted offline, is that something like the following should be done. I'm not fully convinced that this is the best way to solve the problem; I'm definitely open to additional suggestions.. Thanks! -Garrett Index: etc/network.subr =================================================================== --- etc/network.subr (revision 225558) +++ etc/network.subr (working copy) @@ -1260,11 +1260,16 @@ _lo= for _if in ${_autolist} ; do if autoif $_if; then - if [ "$_if" = "lo0" ]; then + case "$_if" in + lo0) _lo="lo0 " - else + ;; + ipfw[0-9]*|\ + pflog[0-9]*|\ + pfsync[0-9]*) _tmplist="${_tmplist} ${_if}" - fi + ;; + esac fi done _tmplist="${_lo}${_tmplist# }"