[OpenWrt-Devel] Dnsmasq DHCP service works only on second start
Karsten Merker
merker at debian.org
Sat May 21 07:39:37 EDT 2016
Hello,
I have upgraded a router to the current OpenWRT git head (svn
rev. 49377, git commit cda52dcb329e026) and now experience a
strange effect:
After the router has booted, dnsmasq runs and provides DNS
service, but it doesn't provide DHCP service. It doesn't bind on
the bootps port and there is nothing about dnsmasq-dhcp in the
log.
If I then run "/etc/init.d/dnsmasq stop; /etc/init.d/dnsmasq
start", it binds on the bootps port, lists the DHCP ranges in
the log and everything works as it should:
[Note: the actual addresses in the config have been replaced
by letters for privacy reasons]
-----8<----------8<----------8<----------8<----------8<----------8<-----
root at router:/# netstat -ap |grep dnsmasq
tcp 0 0 0.0.0.0:domain 0.0.0.0:* LISTEN 1530/dnsmasq
tcp 0 0 :::domain :::* LISTEN 1530/dnsmasq
udp 0 0 0.0.0.0:domain 0.0.0.0:* 1530/dnsmasq
udp 0 0 0.0.0.0:tftp 0.0.0.0:* 1530/dnsmasq
udp 0 0 :::domain :::* 1530/dnsmasq
udp 0 0 :::tftp :::* 1530/dnsmasq
unix 2 [ ] DGRAM 2749 1530/dnsmasq
root at router:/# /etc/init.d/dnsmasq stop
root at router:/# /etc/init.d/dnsmasq start
root at router:/# netstat -ap |grep dnsmasq
tcp 0 0 0.0.0.0:domain 0.0.0.0:* LISTEN 1964/dnsmasq
tcp 0 0 :::domain :::* LISTEN 1964/dnsmasq
udp 0 0 0.0.0.0:domain 0.0.0.0:* 1964/dnsmasq
udp 0 0 0.0.0.0:bootps 0.0.0.0:* 1964/dnsmasq
udp 0 0 0.0.0.0:tftp 0.0.0.0:* 1964/dnsmasq
udp 0 0 :::domain :::* 1964/dnsmasq
udp 0 0 :::tftp :::* 1964/dnsmasq
unix 2 [ ] DGRAM 3641 1964/dnsmasq
root at router:/# cat /var/etc/dnsmasq.conf
# auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
domain-needed
filterwin2k
localise-queries
read-ethers
bogus-priv
expand-hosts
enable-tftp
server=/lan/
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
tftp-root=/usbstorage/tftp/
stop-dns-rebind
dhcp-broadcast=tag:needs-broadcast
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
user=dnsmasq
group=dnsmasq
dhcp-range=lan,a.b.c.d,a.b.c.e,255.255.255.0,12h
no-dhcp-interface=eth0.2
dhcp-range=foo,m.n.o.p,m.n.o.q,255.255.255.0,12h
dhcp-range=bar,v.w.x.y,v.w.x.z,255.255.255.0,1h
-----8<----------8<----------8<----------8<----------8<----------8<-----
(eth0.2 is the WAN interface)
Syslog entries on boot:
-----8<----------8<----------8<----------8<----------8<----------8<-----
daemon.info dnsmasq[1530]: started, version 2.75 cachesize 150
daemon.info dnsmasq[1530]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
daemon.info dnsmasq-tftp[1530]: TFTP root is /usbstorage/tftp/
daemon.info dnsmasq[1530]: using local addresses only for domain lan
daemon.info dnsmasq[1530]: reading /tmp/resolv.conf.auto
daemon.info dnsmasq[1530]: using local addresses only for domain lan
daemon.info dnsmasq[1530]: using nameserver xxx.xxx.xxx.xxx#53
daemon.info dnsmasq[1530]: using nameserver yyy.yyy.yyy.yyy#53
daemon.info dnsmasq[1530]: read /etc/hosts - 12 addresses
daemon.info dnsmasq[1530]: read /tmp/hosts/dhcp - 0 addresses
-----8<----------8<----------8<----------8<----------8<----------8<-----
Syslog entries on dnsmasq restart:
-----8<----------8<----------8<----------8<----------8<----------8<-----
daemon.info dnsmasq[1530]: exiting on receipt of SIGTERM
daemon.info dnsmasq[1964]: started, version 2.75 cachesize 150
daemon.info dnsmasq[1964]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
daemon.info dnsmasq-dhcp[1964]: DHCP, IP range v.w.x.y -- v.w.x.z, lease time 1h
daemon.info dnsmasq-dhcp[1964]: DHCP, IP range m.n.o.p -- m.n.o.q, lease time 12h
daemon.info dnsmasq-dhcp[1964]: DHCP, IP range a.b.c.d -- a.b.c.e, lease time 12h
daemon.info dnsmasq-tftp[1964]: TFTP root is /usbstorage/tftp/
daemon.info dnsmasq[1964]: using local addresses only for domain lan
daemon.info dnsmasq[1964]: reading /tmp/resolv.conf.auto
daemon.info dnsmasq[1964]: using local addresses only for domain lan
daemon.info dnsmasq[1964]: using nameserver xxx.xxx.xxx.xxx#53
daemon.info dnsmasq[1964]: using nameserver yyy.yyy.yyy.yyy#53
daemon.info dnsmasq[1964]: read /etc/hosts - 12 addresses
daemon.info dnsmasq[1964]: read /tmp/hosts/dhcp - 0 addresses
daemon.info dnsmasq-dhcp[1964]: read /etc/ethers - 11 addresses
-----8<----------8<----------8<----------8<----------8<----------8<-----
I don't know where the empty lines in /var/etc/dnsmasq.conf come
from, but they are there both on the first and on the second
start, so I suppose that they don't matter.
The router was previously running an older Designated Driver
build (IIRC from end of march/beginning of april) that has worked
flawlessly. Unfortunately I haven't noted the previous build
revision. The config is unchanged between the old and the new
build. I have skimmed through the commit logs but haven't found
anything that would explain the change in behaviour. Does
anybody have an idea what could have gone wrong here?
Regards,
Karsten
--
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list