From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3718 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Proposed roadmap to 1.0 Date: Wed, 24 Jul 2013 10:42:45 -0400 Message-ID: <20130724144245.GT3249@brightrain.aerifal.cx> References: <20130629235041.GA5046@brightrain.aerifal.cx> <20130724221410.4b17905d@sibserver.ru> 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 1374676978 15035 80.91.229.3 (24 Jul 2013 14:42:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jul 2013 14:42:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3722-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 24 16:43:00 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 1V20HL-0002J1-SA for gllmg-musl@plane.gmane.org; Wed, 24 Jul 2013 16:42:59 +0200 Original-Received: (qmail 29981 invoked by uid 550); 24 Jul 2013 14:42:58 -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 29969 invoked from network); 24 Jul 2013 14:42:58 -0000 Content-Disposition: inline In-Reply-To: <20130724221410.4b17905d@sibserver.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3718 Archived-At: 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 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. > 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. Rich