Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2011 18:08:43 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        d@delphij.net
Cc:        freebsd-rc@freebsd.org
Subject:   Re: [RFC] Use noafif in dhcpif and sycndhcpif
Message-ID:  <CAGH67wQ9oafJog%2BPk2zUr1T0PtDb5yTuNFXe4NBsA63OzgxGzg@mail.gmail.com>
In-Reply-To: <4E7A75EB.80308@delphij.net>
References:  <4E7A75EB.80308@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, Sep 21, 2011 at 4:40 PM, Xin LI <delphij@delphij.net> 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# }"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wQ9oafJog%2BPk2zUr1T0PtDb5yTuNFXe4NBsA63OzgxGzg>