Date: Wed, 21 Sep 2011 19:16:33 -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: <CAGH67wSa2%2Bp6Rx=NLG8RtjgWDG%2BrJYLvnKpKxY1TKx3Y5TJNCA@mail.gmail.com> In-Reply-To: <CAGH67wQAoHAtyvbjV%2BStx30d_xz-WFLCX0pRxUeXnXMDvr5-Xg@mail.gmail.com> References: <4E7A75EB.80308@delphij.net> <CAGH67wQ9oafJog%2BPk2zUr1T0PtDb5yTuNFXe4NBsA63OzgxGzg@mail.gmail.com> <CAGH67wQAoHAtyvbjV%2BStx30d_xz-WFLCX0pRxUeXnXMDvr5-Xg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 21, 2011 at 6:12 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
> On Wed, Sep 21, 2011 at 6:08 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
>> 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# }"
>>
>
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wSa2%2Bp6Rx=NLG8RtjgWDG%2BrJYLvnKpKxY1TKx3Y5TJNCA>
