From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4833 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: if_nameindex/getifaddrs and dhcpcd issue Date: Tue, 8 Apr 2014 09:42:55 -0400 Message-ID: <20140408134255.GE26358@brightrain.aerifal.cx> References: <20140408111147.5f79729f@ncopa-desktop.alpinelinux.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1396964633 13429 80.91.229.3 (8 Apr 2014 13:43:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2014 13:43:53 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4837-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 08 15:43:46 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WXWJW-0007he-D4 for gllmg-musl@plane.gmane.org; Tue, 08 Apr 2014 15:43:46 +0200 Original-Received: (qmail 7792 invoked by uid 550); 8 Apr 2014 13:43:44 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7366 invoked from network); 8 Apr 2014 13:43:08 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4833 Archived-At: 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