dnsmasq doesn't listen on a given 127.* listen-address if bind-dynamic, interface and except-interface options are given

Bug #1203430 reported by Thomas Hood
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dnsmasq (Ubuntu)
In Progress
Medium
Unassigned

Bug Description

If I start dnsmasq as follows

    dnsmasq --conf-file= --resolv-file=/tmp/r.conf --bind-dynamic --listen-address=127.0.3.1
    echo "nameserver 192.168.1.254" > /tmp/r.conf

then I can resolve a name, e.g., "www.microsoft.com", with dig.

    dig @127.0.3.1 www.microsoft.com

And I can still resolve names with that "dig" command if I start dnsmasq as follows (with "--interface=eth0").

    dnsmasq --conf-file= --resolv-file=/tmp/r.conf --bind-dynamic --listen-address=127.0.3.1 --interface=eth0
    echo "nameserver 192.168.1.254" > /tmp/r.conf

However, I can't resolve anything if I start dnsmasq as follows (with "--except-interface=lo").

    dnsmasq --conf-file= --resolv-file=/tmp/r.conf --bind-dynamic --listen-address=127.0.3.1 --interface=eth0 --except-interface=lo
    echo "nameserver 192.168.1.254" > /tmp/r.conf

Dnsmasq just doesn't respond even though it's supposedly listening at 127.0.3.1.

> # netstat -nlp | grep :53
> tcp 0 0 127.0.3.1:53 0.0.0.0:* LISTEN 5887/dnsmasq
> tcp 0 0 192.168.1.20:53 0.0.0.0:* LISTEN 5887/dnsmasq
> tcp6 0 0 fe80::f2de:f1ff:fe6b:53 :::* LISTEN 5887/dnsmasq
> udp 0 0 0.0.0.0:5353 0.0.0.0:* 768/avahi-daemon: r
> udp 0 0 127.0.3.1:53 0.0.0.0:* 5887/dnsmasq
> udp 0 0 192.168.1.20:53 0.0.0.0:* 5887/dnsmasq
> udp6 0 0 :::5353 :::* 768/avahi-daemon: r
> udp6 0 0 fe80::f2de:f1ff:fe6b:53 :::* 5887/dnsmasq

If I start dnsmasq as above but with "--bind-interfaces" instead of "--bind-dynamic" then the "dig" command works.

Additional info:

> # ifconfig
> eth0 Link encap:Ethernet HWaddr f0:de:f1:6b:22:bf
> inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0
> inet6 addr: fe80::f2de:f1ff:fe6b:22bf/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:124343 errors:0 dropped:0 overruns:0 frame:0
> TX packets:59204 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:56834893 (56.8 MB) TX bytes:8614172 (8.6 MB)
> Interrupt:20 Memory:f2500000-f2520000
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1/128 Scope:Host
> UP LOOPBACK RUNNING MTU:65536 Metric:1
> RX packets:806 errors:0 dropped:0 overruns:0 frame:0
> TX packets:806 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:220819 (220.8 KB) TX bytes:220819 (220.8 KB)

Dnsmasq version: 2.65-1ubuntu1

Changed in dnsmasq (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Simon Kelley (simon-thekelleys) wrote :

Fixed in developement version.

thttp://hekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=edf0bde0c6837b010560c40e6b74d2f67b64da09

Simon.

Thomas Hood (jdthood)
Changed in dnsmasq (Ubuntu):
status: New → In Progress
Revision history for this message
Thomas Hood (jdthood) wrote :

Fixed in 2.67, not in 2.66.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.