Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 8 Apr 2014 09:42:55 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: if_nameindex/getifaddrs and dhcpcd issue

On Tue, Apr 08, 2014 at 11:07:47AM +0100, Justin Cormack wrote:
> However I can see no reason why dhcp on a specified interface needs to
> enumerate interfaces at all,

Indeed. Regardless of how we address this topic in musl, I think we
should push for dhcpcd to be fixed. udhcpcd works perfectly fine with
no scanning of interfaces; you simply tell it the interface to use,
and it uses that. My understanding is that dhcpcd can do the same, but
it still insists on scanning all interfaces and refuses to run if the
interface you requested to use is not in the list. This is bad
behavior.

The other case, where no interface is specified on the command line
and dhcpcd tries all interfaces, is buggy usage by the caller. There
are all sorts of interfaces that might exist, unconfigured, and which
might not be appropriate to send dhcpc requests on. I assume dhcpcd
has some heuristics to avoid selecting things like unconfigured
tunnel, slip, etc. interfaces but if so that's just an ugly hack. The
operation of "try all instances of a given type of resource" is just
wrong by design.

> and it only needs to read ipv4 addresses,
> unless it is implementing dhcp6 too, maybe it does now. Again dhcp6
> needs netlink, the Musl ipv6 parts for getifaddrs already use /proc
> which is definitely unreliable for early boot config in a distro in my
> view.

In what way does dhcp6 need netlink? What's made this discussion
difficult so far on IRC is assertions of that form (although not the
same one) without an explanation of why it's believed to be true, so
I'd like to keep rational discussion possible by making sure that such
claims are backed up by explanation rather than just stated as fact.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.