From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2285 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: A few issues on MIPS and now on ARMEL Date: Thu, 15 Nov 2012 19:11:10 -0500 Message-ID: <20121116001110.GL20323@brightrain.aerifal.cx> References: <20121115233725.GK20323@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 X-Trace: ger.gmane.org 1353024683 28593 80.91.229.3 (16 Nov 2012 00:11:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2012 00:11:23 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2286-gllmg-musl=m.gmane.org@lists.openwall.com Fri Nov 16 01:11:33 2012 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 1TZ9Wt-0006LV-Pd for gllmg-musl@plane.gmane.org; Fri, 16 Nov 2012 01:11:31 +0100 Original-Received: (qmail 22171 invoked by uid 550); 16 Nov 2012 00:11:21 -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 22160 invoked from network); 16 Nov 2012 00:11:21 -0000 Content-Disposition: inline In-Reply-To: <20121115233725.GK20323@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2285 Archived-At: On Thu, Nov 15, 2012 at 06:37:25PM -0500, Rich Felker wrote: > On Fri, Nov 16, 2012 at 12:21:11AM +0200, Paul Schutte wrote: > > Hi guys, > > > > I am now hitting a similar problem on armel. > > > > I am cross-compiling "dnsmasq" > > > > Glibc strace: > > > > ---snip--- > > socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5 > > fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) > > fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 > > setsockopt(5, SOL_IP, IP_MTU_DISCOVER, [0], 4) = 0 > > setsockopt(5, SOL_IP, IP_PKTINFO, [1], 4) = 0 > > setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 > > setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 > > > > > > Musl strace: > > > > socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5 > > fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) > > fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0 > > setsockopt(5, SOL_IP, IP_MTU_DISCOVER, [0], 4) = 0 > > setsockopt(5, SOL_IP, IP_PKTINFO, [1], 4) = 0 > > setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 > > setsockopt(5, SOL_SOCKET, *0xf /* SO_??? */*, [1], 4) = -1 ENOPROTOOPT > > (Protocol not available) > > Thanks for the report. I'll check and see if ARM has unusual > definitions we're missing. This doesn't seem to be ARM-specific. Linux has reserved a number for SO_REUSEPORT, but it's not implemented in the kernel it seems, and musl is providing the value, presumably causing the app to use it and think it works. I'm guessing I should just remove it, but it might be possible/preferable to make setsockopt and getsockopt remap it to SO_REUSEADDR internally. Ideas anyone? Rich