From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3720 Path: news.gmane.org!not-for-mail From: orc Newsgroups: gmane.linux.lib.musl.general Subject: Re: Proposed roadmap to 1.0 Date: Wed, 24 Jul 2013 23:29:42 +0800 Message-ID: <20130724232942.45f4b7ba@sibserver.ru> References: <20130629235041.GA5046@brightrain.aerifal.cx> <20130724221410.4b17905d@sibserver.ru> <20130724144245.GT3249@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1374679367 12330 80.91.229.3 (24 Jul 2013 15:22:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jul 2013 15:22:47 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3724-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 24 17:22:49 2013 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 1V20ts-0008Is-Pm for gllmg-musl@plane.gmane.org; Wed, 24 Jul 2013 17:22:48 +0200 Original-Received: (qmail 19676 invoked by uid 550); 24 Jul 2013 15:22:48 -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 19665 invoked from network); 24 Jul 2013 15:22:48 -0000 In-Reply-To: <20130724144245.GT3249@brightrain.aerifal.cx> X-Mailer: claws-mail Xref: news.gmane.org gmane.linux.lib.musl.general:3720 Archived-At: On Wed, 24 Jul 2013 10:42:45 -0400 Rich Felker wrote: > On Wed, Jul 24, 2013 at 10:14:10PM +0800, orc wrote: > > While building a file server/router I found some > > bugs/incompatibilities in getaddrinfo() and getifaddrs(). > > > > getaddrinfo() does not reports IPv6 available when asked with > > AF_UNSPEC. Thus, servers like openssh or tinc (vpn daemon) still > > bind only IPv4 socket when they configured to bind IPv4 and IPv6 > > sockets. > > Indeed, this is an oversight. > > > getifaddrs() does not returns AF_PACKET like glibc does, so list of > > all system interfaces is incomplete (does not shows inactive > > interfaces). > > Is there a use case you want this for? I remember when we added > getifaddrs this was discussed, and I was hesitant to add AF_PACKET > because it's using some deprecated version of some structure where the > fields are too small to store the values they're supposed to > represent. I'd have to look through the mailing list and/or IRC logs > to recall the details, though. I'm not entirely opposed to it if > there's a serious need, but at the time it seemed like a poorly > designed interface. I faced problem when I tried to build dhcpcd with musl. I dropped dhcpcd then, found simple default.script for udhcpc and forgot about any problems. > > > I attached patch for getaddrinfo() (adopt it if you need it) > > and test program. > > I think it could be cleaner/simpler but I might just commit it as-is > for now and wait to clean it up until the getaddrinfo cleanup/overhaul > which was scheduled for this release cycle but will get pushed back to > the next. Thanks for review. I think I can apply it now on server :) > > > I still have no any clues about getifaddrs(), but > > that is not critical. It is usually implemented with help of netlink > > (and possibly there is no other way, maybe some /proc file will > > give a list) > > musl's is entirely based on /proc because the netlink stuff is > undocumented, seemed really bloated, and I didn't want to risk pulling > in code that was inadvertently derived from GNU code. I tried already netlink and dropped it since udhcpc works nicely. I really agree that it is too opaque. > > Rich