Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 02 Apr 2013 17:04:04 +0100
From: Simon Kelley <simon@...kelleys.org.uk>
To: Rich Felker <dalias@...ifal.cx>
CC: musl@...ts.openwall.com
Subject: Re: Breakeage on Linux due to SO_REUSEPORT

On 01/04/13 17:53, Rich Felker wrote:
> Hi,
>
> Back in November, we had a bug report against musl libc due to dnsmasq
> failing because we had defined SO_REUSEPORT in the headers, but Linux
> did not support it. At the time I just removed the definition, but
> we're adding it back now, as Linux has just recently added
> SO_REUSEPORT support, and thus the same issue will arise with glibc
> (which is just including asm/socket.h and thus getting the kernel's
> definition of it) too. I've attached the original bug report thread.
>
> The fundamental problem is that it's not valid to assume SO_REUSEPORT
> is supported/working just because it's defined. Instead, the usage
> pattern should probably be something like
>
> #ifdef SO_REUSEPORT
> 	if (setsockopt(s, SO_REUSEPORT, ...)<0 && errno==ENOPROTOOPT)
> #endif
> 	setsockopt(s, SO_REUSEADDR, ...);
>
>
> Rich
>


Thanks for that. The fix has gone into the forthcoming dnsmasq-2.66 release.


Cheers,

Simon.

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.