Annoying ERROR: 'wlan0' is not a DHCP-enabled interface

Eygene Ryabinkin rea at freebsd.org
Tue Dec 27 15:29:05 UTC 2011


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
> 
> 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.
-- 
Eygene Ryabinkin                                        ,,,^..^,,,
[ Life's unfair - but root password helps!           | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20111227/632deaf4/attachment.pgp


More information about the freebsd-rc mailing list