From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8947 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCHv2] properly handle point-to-point interfaces in getifaddrs() Date: Mon, 30 Nov 2015 15:01:47 -0500 Message-ID: <20151130200147.GU3818@brightrain.aerifal.cx> References: <1447756429-2304-2-git-send-email-jow@openwrt.org> <1447965790-8151-1-git-send-email-jow@openwrt.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 1448913736 1378 80.91.229.3 (30 Nov 2015 20:02:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2015 20:02:16 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8960-gllmg-musl=m.gmane.org@lists.openwall.com Mon Nov 30 21:02:16 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1a3UeO-0003tq-7b for gllmg-musl@m.gmane.org; Mon, 30 Nov 2015 21:02:16 +0100 Original-Received: (qmail 19760 invoked by uid 550); 30 Nov 2015 20:02:07 -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 19728 invoked from network); 30 Nov 2015 20:02:05 -0000 Content-Disposition: inline In-Reply-To: <1447965790-8151-1-git-send-email-jow@openwrt.org> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8947 Archived-At: On Thu, Nov 19, 2015 at 09:43:10PM +0100, Jo-Philipp Wich wrote: > With point-to-point interfaces, the IFA_ADDRESS netlink attribute contains > the peer address while an extra attribute IFA_LOCAL carries the actual local > interface address. > > Both the glibc and uclibc implementations of getifaddrs() handle this case > by moving the ifa_addr contents to the broadcast/remote address union and > overwriting ifa_addr upon receipt of an IFA_LOCAL attribute. > > This patch adds the same special treatment logic of IFA_LOCAL to musl's > implementation of getifaddrs() in order to align its behaviour with that > of uclibc and musl. ^^^^ glibc Committed, fixing this and line folding in the commit message; otherwise, unchanged. Thanks! Rich