ProxyDHCP replies on invalid range
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dnsmasq (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
In Ubuntu 16.04, I've configured dnsmasq to reply on subnet=
I've only seen this after clean system restart. If I restart dnsmasq later on, it works as expected.
Maybe when dnsmasq starts, the network isn't up yet, and it incorrectly initializes some networking information? I'm using network-manager with DHCP.
Details:
$ egrep -rv '^#|^$' /etc/dnsmasq.*
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
/etc/dnsmasq.
$ ip a
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,
link/ether d0:50:99:a6:bc:0a brd ff:ff:ff:ff:ff:ff
inet 10.161.254.185/24 brd 10.161.254.255 scope global dynamic enp2s0
valid_lft 431873sec preferred_lft 431873sec
inet6 fe80::f363:
valid_lft forever preferred_lft forever
$ sudo netstat -nap | grep dnsmasq
[sudo] password for administrator:
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 843/dnsmasq
tcp6 0 0 :::53 :::* LISTEN 843/dnsmasq
udp 0 0 0.0.0.0:53 0.0.0.0:* 843/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 843/dnsmasq
udp 0 0 0.0.0.0:69 0.0.0.0:* 843/dnsmasq
udp 0 0 0.0.0.0:4011 0.0.0.0:* 843/dnsmasq
udp6 0 0 :::53 :::* 843/dnsmasq
udp6 0 0 :::69 :::* 843/dnsmasq
unix 2 [ ] DGRAM 15746 843/dnsmasq
$ grep dnsmasq /var/log/syslog | tail -n 30
Dec 19 10:52:17 ltsp-server systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Dec 19 10:52:17 ltsp-server dnsmasq[630]: dnsmasq: syntax check OK.
Dec 19 10:52:20 ltsp-server dnsmasq[843]: started, version 2.75 cachesize 150
Dec 19 10:52:20 ltsp-server dnsmasq[843]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Dec 19 10:52:20 ltsp-server dnsmasq[843]: DNS service limited to local subnets
Dec 19 10:52:20 ltsp-server dnsmasq-dhcp[843]: DHCP, IP range 192.168.67.20 -- 192.168.67.250, lease time 8h
Dec 19 10:52:20 ltsp-server dnsmasq-dhcp[843]: DHCP, proxy on subnet 10.160.37.0
Dec 19 10:52:20 ltsp-server dnsmasq-tftp[843]: TFTP root is /var/lib/tftpboot/
Dec 19 10:52:20 ltsp-server dnsmasq[843]: no servers found in /var/run/
Dec 19 10:52:20 ltsp-server dnsmasq[843]: read /etc/hosts - 7 addresses
Dec 19 10:52:23 ltsp-server systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Dec 19 10:52:29 ltsp-server dnsmasq[843]: reading /var/run/
Dec 19 10:52:29 ltsp-server dnsmasq[843]: ignoring nameserver 127.0.0.1 - local interface
Dec 19 10:52:29 ltsp-server dnsmasq[843]: using nameserver 194.63.238.4#53
Dec 19 10:52:29 ltsp-server dnsmasq[843]: using nameserver 8.8.8.8#53
Dec 19 08:52:47 ltsp-server dnsmasq-dhcp[843]: PXE(enp2s0) 52:54:00:8f:74:ad proxy
Dec 19 08:52:47 ltsp-server dnsmasq-dhcp[843]: PXE(enp2s0) 10.161.254.195 52:54:00:8f:74:ad /ltsp/i386/
Dec 19 08:52:47 ltsp-server dnsmasq-tftp[843]: sent /var/lib/
...
Note that it replies in "52:54:00:8f:74:ad proxy" while it shouldn't.
If I run this:
# service dnsmasq restart
Then it behaves correctly:
Dec 19 09:01:17 ltsp-server dnsmasq-dhcp[2381]: no address range available for DHCP request via enp2s0
Changed in dnsmasq (Ubuntu): | |
importance: | Undecided → High |
I did another test:
* I unplugged the network cable so that the ltsp-server didn't have an ip.
* I ran `service dnsmasq restart`.
* I plugged the network cable back in.
* ...and the problem came back again, i.e. dnsmasq replied on invalid range.
This again suggests that it's some kind of wrong initialization when the network is down while dnsmasq starts.
Using dnsmasq 2.75-1ubuntu0. 16.04.1 on i386 architecture.