From owner-freebsd-rc@FreeBSD.ORG Thu Sep 22 02:16:34 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 C9D60106564A; Thu, 22 Sep 2011 02:16:34 +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 6B8028FC0A; Thu, 22 Sep 2011 02:16:34 +0000 (UTC) Received: by qyk10 with SMTP id 10so5731383qyk.13 for ; Wed, 21 Sep 2011 19:16:33 -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:content-transfer-encoding; bh=jrlwd97FdaAiy7nsKylx/Iz9yHIxu77ueUefbZ/MspU=; b=X+2aohIRC88PcAosUdQYy/2GGwW4/lcu3ZfiEY+w04ef6bGjUPPUijfPp6O1uL+ERA dVrx48nDYCklw6cRYQ8103X4OiEOdfGNPOPJ24d9M9KPuyVAVOdEGvtrhKAuguIlRy3k a4sofGHyW2fyy4jbAWOdG0iVvASjIQ86ZK/cU= MIME-Version: 1.0 Received: by 10.224.87.82 with SMTP id v18mr1400814qal.74.1316657793289; Wed, 21 Sep 2011 19:16:33 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Wed, 21 Sep 2011 19:16:33 -0700 (PDT) In-Reply-To: References: <4E7A75EB.80308@delphij.net> Date: Wed, 21 Sep 2011 19:16:33 -0700 Message-ID: From: Garrett Cooper To: d@delphij.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 02:16:35 -0000 On Wed, Sep 21, 2011 at 6:12 PM, Garrett Cooper wrote: > On Wed, Sep 21, 2011 at 6:08 PM, Garrett Cooper wrot= e: >> 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 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- etc/network.subr =A0 (revision 225558) >> +++ etc/network.subr =A0 (working copy) >> @@ -1260,11 +1260,16 @@ >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_lo=3D >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0for _if in ${_autolist} ; do >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if autoif $_if; then >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if [ "$_if= " =3D "lo0" ]; then >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0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A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fi >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0done >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_tmplist=3D"${_lo}${_tmplist# }" >> > > I meant to use the above context :)... Arguably, changing ifconfig -l to ifconfig -l inet (or inet6) in the above invocation would work too, assuming that the kernel was compiled with INET support... Thanks, -Garrett