Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 2011 19:28:56 +0400
From:      Eygene Ryabinkin <rea@freebsd.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        Pyun Yong-Hyeon <pyunyh@gmail.com>, Brooks Davis <brooks@freebsd.org>, freebsd-rc@FreeBSD.ORG, Garrett Cooper <yanegomi@gmail.com>, Gleb Smirnoff <glebius@FreeBSD.org>, Dag-Erling Smorgrav <des@des.no>, d@delphij.net, Xin LI <delphij@delphij.net>
Subject:   Re: Annoying ERROR: 'wlan0' is not a DHCP-enabled interface
Message-ID:  <Xa33za/%2Bcev7efMWy8sIGPyc/n4@g5jH1yj%2BTnAiSdLOy3xs5Jutvhc>
In-Reply-To: <4EF99DBC.6020204@FreeBSD.org>
References:  <LKVlrdfIBdRPFfTmZOlaU48u3P0@g5jH1yj%2BTnAiSdLOy3xs5Jutvhc> <4EF99DBC.6020204@FreeBSD.org>

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

--309evMHi/619oHyA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Tue, Dec 27, 2011 at 02:28:12AM -0800, Doug Barton wrote:
> On 12/27/2011 01:26, Eygene Ryabinkin wrote:
> > I would not be against the netif route, but it creates serious
> > problems
>=20
> Ok, you've convinced me that this approach isn't viable.

How cool is that ;))

> That's why I asked for review before committing it. Thanks for
> looking at it in more detail.

You are welcome.

> I will take a stab at the idea of a wrapper script tomorrow. It's not
> going to need to duplicate anything more of the mechanics of
> rc.d/dhclient than calling dhcpif(), which is itself from network.subr,
> so the code duplication is extremely minimal. If nothing else, the
> ability to add configuration of IPv6 interfaces here would make it
> worthwhile.

I have no problems with the wrapper if it will do some additional
tasks, but just one question: if we will omit the IPv6 stuff for a
while, how your wrapper will be different from my approach of using
the 'quietstart' keyword?  Your wrapper will determine that DHCP isn't
enabled on the interface and will call 'service dhclient quietstart
$ifn'.  My 'quietstart' patch already embeds the part of your wrapper
that uses dhcpif and will bail out quickly.

The general logics for your wrapper (the full one, with IPv6 autoconf)
will likely look as the following:
{{{
start () {
	service dhclient quietstart $ifn && exit 0
	<ipv6-autoconf> quietstart $ifn && exit 0
	exit 1
}
}}}
One could conditionalize the priority of DHCP and IPv6 given that
the dhclient from base will support IPv6 at some point (just now
it doesn't support, at least I hadn't found any IPv6 bits inside
/usr/src/sbin/dhclient in -CURRENT), but that's another story
that is out of the current scope.

Your wrapper, that won't exploit my patch, will look like
{{{
start () {
	dhcpif $ifn && \
	  service dhclient quietstart $ifn && exit 0
	ipv6_autoconfif $1 && \
	  <ipv6-autoconf> quietstart $ifn && exit 0
	exit 1
}
}}}

I just wonder why you're not up to using the existing 'quietstart'
semantics?  Our conversation 'bout it stopped at the point of the
message
  http://lists.freebsd.org/pipermail/freebsd-rc/2011-December/002587.html

It will be still good to know what worries you in my approach.  Could
you, please, answer to the first part of my message about the failure
you're concerned with?

Thanks.
--=20
Eygene Ryabinkin                                        ,,,^..^,,,
[ Life's unfair - but root password helps!           | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]

--309evMHi/619oHyA
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iF4EAREIAAYFAk755DgACgkQFq+eroFS7Ps2fwEAhspur+C4DZa4JexXmVY2KsPT
kdg72HkUY2756aRmsV0A/R10lImzEEh0Ecs4RCJ1+slBV38LQdCT9/PZ3x9582+W
=1Ikv
-----END PGP SIGNATURE-----

--309evMHi/619oHyA--



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