From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4842 Path: news.gmane.org!not-for-mail From: Justin Cormack Newsgroups: gmane.linux.lib.musl.general Subject: Re: if_nameindex/getifaddrs and dhcpcd issue Date: Tue, 8 Apr 2014 22:30:34 +0100 Message-ID: References: <20140408111147.5f79729f@ncopa-desktop.alpinelinux.org> <20140408134255.GE26358@brightrain.aerifal.cx> <20140408231620.64546259@ncopa-laptop> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1396992652 28451 80.91.229.3 (8 Apr 2014 21:30:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2014 21:30:52 +0000 (UTC) Cc: Rich Felker To: musl@lists.openwall.com Original-X-From: musl-return-4846-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 08 23:30:48 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 1WXdbT-0001Et-Jp for gllmg-musl@plane.gmane.org; Tue, 08 Apr 2014 23:30:47 +0200 Original-Received: (qmail 11404 invoked by uid 550); 8 Apr 2014 21:30:46 -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 11390 invoked from network); 8 Apr 2014 21:30:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=specialbusservice.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=L0SDzYnAGfK0NQeGbRwj0oKqZAco+4rQ+y1rC0tyxyg=; b=EKIFXEfI9tMSAXq1JCr/PFDQATqK5L8tm98Jz2BJXSDAR16Os+kZVz0hhnIaX18f75 3fxjnP1IpXJ7g0p5sd1Z0Onp7s4HjzjuzUujFG3XjA1O+EnPxweY8TUR2cCAPlC/BZa9 0wEzAP8urTa640eRfq0ukdD87P0G/lVZDOuVE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=L0SDzYnAGfK0NQeGbRwj0oKqZAco+4rQ+y1rC0tyxyg=; b=a2o3hdcyB8z14FcesWQT9mGwU6MDjLveYT51jwtsSh8LHJNSilKo22c4wY5WYh1C2C 3WeqcfQSx0jX7Q2lLS3EDF/Wuah1m19Jgrp2xieq7WPyHXExNRP6AjC7LfUDvLGK17EB Q2K44Unzv3tpsVs+VNZ4oj6rlj8LOmKIZPqpmnpzD1Jw3pcMwjKe0xY4Vs38BpCIV9+y oid2oPRYRYRvVjPISuCNMA2+NjeCH0xXH5ijcrd50I2lrgBZPn64hZQmhDzHxnGFbOYg 8JROI05HtbSgaDKbeP2O5TvcYsUzAyVt4zIG4podAcqtK6FLrIm6gRtbBMwv2Q0BRrLb gYdA== X-Gm-Message-State: ALoCoQllV+oMcu5Yr0gfu/iJW9rRU8s1BXGrLLg3S5hvRiLbuERK7ZVQPMmoB+PstTAy2c0rBq71 X-Received: by 10.60.62.178 with SMTP id z18mr3893951oer.61.1396992634408; Tue, 08 Apr 2014 14:30:34 -0700 (PDT) In-Reply-To: <20140408231620.64546259@ncopa-laptop> Xref: news.gmane.org gmane.linux.lib.musl.general:4842 Archived-At: On Tue, Apr 8, 2014 at 10:16 PM, Natanael Copa wrote: > It looks like the reason for this is that you can provide a wilcard, eg > 'eth*' and it will monitor all interfaces that fnmatches that. > >> 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. > > Yes you can configure a list of exact interfaces that you want dhcpcd > to monitor or you can have a black list - with wilcards. > > See allowinterfaces and denyinterfaces (which also can be specified on > command line) http://roy.marples.name/man/html5/dhcpcd.conf.html > > dhcpcd is more an ifplugd + dhcp client wit optional support for dbus. > It can also get notifications from wpa_supplicant. You can even have > dhcpcd to set static ip addresses. So its more an alternative to > NetworkManager than to udhcpc. > > Other thing it can handle is currently unknown interfaces. For example > the laptop I use right now does not have any ethernet port, only wifi. > I do have an ethernet USB adapter. So eth0 is not there at bootup. I > currently get error messages on screen due to udhcpc does not find the > configured eth0 interface. > > To solve this, without needing install the full NetworkManager suite or > systemds networkd, I can simply let dhcpcd run in manager mode, and it > will run the show. There is even a dhcpcd-ui applet that gives me link > status etc on my desktop. Sounds like the sort of design that should have netlink built into it then. You can do all sorts of useful things then, like listen on a netlink socket for new interfaces being created. Justin