[Dnsmasq-discuss] 2.53rc2
Simon Kelley
simon at thekelleys.org.uk
Thu May 27 21:11:33 BST 2010
clemens fischer wrote:
> clemens fischer wrote:
>
>> 2010-05-27_16:07:11.54045 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7
>> 2010-05-27_16:07:11.54059 setsockopt(7, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
>> 2010-05-27_16:07:11.54073 bind(7, {sa_family=AF_INET,
>> sin_port=htons(53), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE
>> (Address already in use)
>> 2010-05-27_16:07:11.54092
>> 2010-05-27_16:07:11.54110 dnsmasq: failed to create listening
>> socket: Address already in use
>
> I forgot to mention this:
>
> except-interface=nic0
> except-interface=nicI
> except-interface=lo
> no-dhcp-interface=nic0
> no-dhcp-interface=nicI
> no-dhcp-interface=lo
>
> With these settings and "--interface=x --bind-interfaces" on the command
> line, I still get:
>
> dnsmasq 16293 nobody 5u IPv4 60646 0t0 UDP *:67
> dnsmasq 16293 nobody 6u IPv6 60660 0t0 TCP [fe80::21f:1fff:fe52:9dbd]:53 (LISTEN)
> dnsmasq 16293 nobody 7u IPv6 60661 0t0 UDP [fe80::21f:1fff:fe52:9dbd]:53
> dnsmasq 16293 nobody 8u IPv4 60662 0t0 TCP 192.168.3.1:53 (LISTEN)
> dnsmasq 16293 nobody 9u IPv4 60663 0t0 UDP 192.168.3.1:53
>
> I expected dnsmasq to bind 192.168.3.1:67 instead of *:67. This is no
> problem in my situation, but what happens when I need to use a dhcp
> relay?
>
Binding 192.168.3.1:67 means that packets from unconfigured hosts which
are sent to 255.255.255.255:67 have problems on some platforms.
If you set --bind-interfaces then dnsmasq will set the SO_REUSEADDR flag
on that socket, which allows you to run a relay which also listens on
*:67, as long as it also sets that flag.
On my list is to add a command-line option to dhcp-helper to do exactly
that.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list