[Dnsmasq-discuss] SO_REUSEPORT and SO_REUSEADDR

Simon Kelley simon at thekelleys.org.uk
Wed Aug 14 15:56:03 BST 2013


On 14/08/13 12:43, Tomas Hozza wrote:
> Hi.
>
> In Fedora I had recently a couple of Bugs because of dnsmasq conflicting with
> ISC DHCP because of dnsmasq binding to ANY_ADDR for DHCPv4 socket.
> dnsmasq uses SO_REUSEPORT if the system supports it instead of
> SO_REUSEADDR.
>
> Since ISC DHCP uses always SO_REUSEADDR for DHCPv4 socket, it conflicted
> with dnsmasq that used SO_REUSEPORT. However I noticed that ISC DHCP sets
> both SO_REUSEPORT and SO_REUSEADDR for DHCPv6 socket (of course if both are
> supported by the system).
>
> I'm wondering if dnsmasq could do the same thing to improve its interoperability
> with other (possibly older) daemons. Of course only if both socket options
> are supported. I'm not sure what downsides this approach would have, but AFIK
> it should not be a problem.
>
My feeling is the same as yours, it shouldn't cause any problems. I've 
pushed a patch to git that makes the change: we'll see if anyone screams.

Simon.



More information about the Dnsmasq-discuss mailing list