OpenWrt/LEDE Project

Welcome to the OpenWrt/LEDE Project bug reporting and issue tracking system

Problems to be reported here are for the OpenWrt/LEDE Project targets, sources, toolchain, core packages, build procedures, distribution and infrastructure. Guidelines for submitting a good bug report can be found at the OpenWrt/LEDE Project website. Problems related to LuCI or OpenWrt packages need to be reported in their repositories:

Notifications of all submissions and task changes are sent to lede-bugs@infradead.org.

OpenedIDCategoryTask TypePrioritySeveritySummaryReported InStatus
18.06.20192328Base systemBug ReportHighMediumAllocate resources to sort out odhcpd/dnsmasq interacti...TrunkNew Task Description

As IPv6 is being adopted, increasingly people are seeing dnsmasq log ‘spam’. See https://bugs.openwrt.org/index.php?do=details&task_id=1492&string=1492&search_name=&type%5B0%5D=&sev%5B0%5D=&pri%5B0%5D=&due%5B0%5D=&reported%5B0%5D=&cat%5B0%5D=&status%5B0%5D=open&percent%5B0%5D=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=

By default under openwrt, dhcpv4 leases are handled by dnsmasq whilst dhcpv6/RA is handled by openwrt’s odhcpd.

odhcpd could handle both v4 & v6 but does not yet have the same configuration flexibility for dhcp options as dnsmasq. I guess this is why no one has been brave enough to switch to odhcpd for ipv4 operations as well as ipv6.

dnsmasq can also handle dhcpv6/RA but not quite as flexibly as odhcpd. dnsmasq will automatically find IP6 prefixes on interfaces and start handling them, whilst openwrt’s strategy with odhcpd is to only handle stuff we tell you to handle, don’t do it automagically.

As dnsmasq is the default resolver for openwrt and the wider LAN, it needs to know about DHCP/hostname allocations. For DHCPv4 this is easy, dnsmasq is controlling them. For DHCPv6 a hosts file (called a statefile in the odhcpd code) is handed to dnsmasq.

By default this host file is not read dynamically, so odhcpd has to signal dnsmasq to re-read the host file (and clear caches etc etc) upon every ipv6 lease change.

This generates a lot of log spam and process startup overhead. There are also questions about service operability during this time.

Effort needs to be put into sorting this out.

Temporary workarounds:

Use ‘hostsdir’ dnsmasq option instead of ‘addn-hosts’ - dnsmasq will dynamically scan changes/additions to hosts in hostsdir whereas addn-hosts needs a SIGHUP. Host deletions cannot be handled by this method, so odhcpd would still need to SIGHUP on lease expiry. It might reduce some of the spam.

Longer term:

Teach dnsmasq to accept hostname updates over an IPC mechanism. ubus? and carry on using odhcpd for ipv6.

Teach dnsmasq to handle ipv6 prefix additions/deletions/handling via an IPC mechanism in the same way as odhcpd. Drop odhcpd and use dnsmasq for everything.

Use odhcpd for everything and use another dns resolver that interfaces nicely with odhcpd.

Why don’t I see this problem: I use dnsmasq to handle ipv6 but I’m lucky enough that this works for me.

This needs fixing/funding to sort it out though.

17.08.201697Base systemBug ReportMediumLowdnsmasq doesn't receive updated dns servers when runnin...TrunkNew Task Description

Bind-mounting /tmp/resolv.conf.auto apparently doesn’t forward inotify events arriving from the kernel when resolv.conf.auto was changed (e.g. upstream DNS servers were received by a DHCP client or pppd). Restarting dnsmasq or running it without ujail solves the issue.

14.06.20203179Base systemBug ReportVery LowLow<dnsmasq 2.81-3> on latest snapshot r13546-4f38063640TrunkUnconfirmed Task Description

I’m on WRT1900ACS with latest snpashot r13546-4f38063640.
I have an issue with latest dnsmasq, the resolv file is in /tmp/resolv.conf.d/resolv.conf.auto. On old was on /tmp/resolv.conf.auto.

With openvpn I have script to prevent dns leak I have tried to change on right location but doesn’t work.
If I set up the dnsmasq to old location /tmp/resolv.conf.auto all the up and down script working, but, when I flash new firmware and I try to reload backup the setting of resolv file is not restored and must be set again.

I hope that I was clear, let me know if you need more info and sorry if I was not accurate on bug report.


11.05.20203090PackagesBug ReportVery LowMediumdnsmasq: daemon.err dnsmasq[6363]: failed to load name...openwrt-19.07Unconfirmed Task Description

Router model : Netgear WNDR3700v1

I upgraded to 19.0.7 yesterday. Since I have the follow issue :
all static leases can’t be resolved (25 hosts).

In system.log I found this logs each time I (re)start dnsmasq :
Mon May 11 05:47:28 2020 daemon.info dnsmasq[6363]: read /etc/hosts - 4 addresses
Mon May 11 05:47:28 2020 daemon.err dnsmasq[6363]: failed to load names from /tmp/hosts/dhcp.cfg01411c: Permission denied
Mon May 11 05:47:28 2020 daemon.info dnsmasq-dhcp[6363]: read /etc/ethers - 0 addresses

So I patched the init.d/dnsmasq adding this line :

 chmod og+r $HOSTFILE

after the line :

 mv -f $HOSTFILE_TMP $HOSTFILE

in function dnsmasq_start

This patch is operational with those logs :
Mon May 11 05:51:57 2020 daemon.info dnsmasq[6613]: read /etc/hosts - 4 addresses
Mon May 11 05:51:57 2020 daemon.info dnsmasq[6613]: read /tmp/hosts/dhcp.cfg01411c - 25 addresses
Mon May 11 05:51:57 2020 daemon.info dnsmasq-dhcp[6613]: read /etc/ethers - 0 addresses

Best regards.
Philippe

13.04.20203006PackagesBug ReportVery LowMediumdnsmasq-full fails to resolve Cloudflare domains if DNS...openwrt-19.07Unconfirmed Task Description

dnsmasq fails to resolve Cloudflare domains if DNSSEC is enabled.

# ping www.galeria.de
ping: bad address 'www.galeria.de'

# nslookup www.galeria.de
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find www.galeria.de: SERVFAIL
Name:      www.galeria.de
www.galeria.de  canonical name = www.galeria.de.cdn.cloudflare.net

/etc/config/dhcp

# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option expandhosts '1'
        option nonegcache       0
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option domain 'fritz.box'
        option local '/box/'
        option nonegcache '0'
        option dnssec '1'
        option dnsseccheckunsigned '1'
        option logqueries '1'
        option logfacility '/tmp/dnsmasq.log'

config dhcp 'lan'
        option interface 'lan'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'
        option start '2'
        option ra_management '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1

This is the generated dnsmasq configuration file

# cat /var/etc/dnsmasq.conf.cfg01411c
# auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
dhcp-authoritative
domain-needed
log-queries=extra
localise-queries
read-ethers
enable-ubus
expand-hosts
bind-dynamic
local-service
log-facility=/tmp/dnsmasq.log
domain=fritz.box
server=/box/
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
stop-dns-rebind
rebind-localhost-ok
conf-file=/usr/share/dnsmasq/trust-anchors.conf
dnssec
dnssec-no-timecheck
dnssec-check-unsigned
dhcp-broadcast=tag:needs-broadcast
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
user=dnsmasq
group=dnsmasq

dhcp-ignore-names=tag:dhcp_bogus_hostname
conf-file=/usr/share/dnsmasq/dhcpbogushostname.conf

bogus-priv
conf-file=/usr/share/dnsmasq/rfc6761.conf
dhcp-range=set:lan,192.168.222.2,192.168.222.151,255.255.255.0,12h

For additional debugging I also compiled the dnsmasq package from https://github.com/openwrt/openwrt/tree/v19.07.2/package/network/services/dnsmasq on Linux (openSUSE Tumbleweed) and there dnsmasq works without problems.

# cat /etc/os-release | head -n2
NAME="openSUSE Tumbleweed"
# VERSION="20200410"
# sudo src/dnsmasq --version
Dnsmasq version 2.80  Copyright (c) 2000-2018 Simon Kelley
Compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile

This software comes with ABSOLUTELY NO WARRANTY.
Dnsmasq is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2 or 3.

# nslookup www.galeria.de
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
www.galeria.de  canonical name = www.galeria.de.cdn.cloudflare.net.
Name:   www.galeria.de.cdn.cloudflare.net
Address: 104.16.230.136
Name:   www.galeria.de.cdn.cloudflare.net
Address: 104.16.231.136

I use OpenWrt 19.07.2 r10947-65030d81f3 with dnsmasq-full - 2.80-16 on a Linksys 1900ACS router.

21.03.20202910Base systemBug ReportVery LowLowMaster branch dnsmasq resolution file path error, DNS c...TrunkUnconfirmed Task Description

As, master branch dnsmasq DNS file should be the default path/TMP/resolv. Conf. D/resolv. Conf., auto, but the route starts the default path is/TMP/resolv. Conf., auto, at this point the DNS to parse, to/TMP/resolv. Conf., d/resolv. Conf., auto path routing all normal...


09.02.20202826PackagesBug ReportVery LowLowdnsmasq: neg-ttl, addn-hosts jail supportTrunkUnconfirmed Task Description

Hi!
Is it possible to add neg-ttl config option to dnsmasq, please?
And maybe set it to a default value of 15minutes?

addn-hosts files are not added to the jail, which results in a failure to load them.

Thanks.

01.12.20192644Base systemBug ReportVery LowLowdnsmasq-full: Cannot satisfy dependenciesopenwrt-19.07Unconfirmed Task Description

Environment:
arch: mips
model: TP-link WDR4300
Openwrt: 19.07.0-rc1

Description:
I probably overlooked but hit the following issue where unable to install dnsmasq-full. Actually downloading only already gives the following warning and wonder if I can/should force-install:

# opkg install dnsmasq-full --download-only
Downloading http://downloads.openwrt.org/releases/19.07.0-rc1/packages/mips_24kc/base/dnsmasq-full_2.80-14_mips_24kc.ipk
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for dnsmasq-full:
 * 	kernel (= 4.14.151-1-342af9e4f67b3447c53216ab8e3b12a1)
 * opkg_install_cmd: Cannot install package dnsmasq-full.
14.10.20192553Base systemBug ReportVery LowMediumdns name resolution with dnsmasq does not work after re...openwrt-18.06Unconfirmed Task Description

I’ve got a bunch of GL-MT300A devices suffering from this issue. They are configured as simple openvpn gateway behind a DSL router. There is no WIFI active, no WAN port, just a LAN interface and openvpn. Dnsmasq is used only for name resolution, and not for DHCP.

After upgrading the device from LEDE 17.01 to OpenWrt 18.06.4 r7808-ef686b7292 (latest stable version according to the website) DNS resolution failes after a reboot of the system.

Even though dnsmasq is up and running (ps shows the deamon, and netstat -tulpen shows the deamon listing to port 53 as it should be) name resolution is not working, preventing openvpn to find its servers.

After restarting dnsmasq (/etc/init.d/dnsmasq restart) name resolution starts to work as expected.

I noticed that /tmp/etc/dnsmasq.conf differes between the reboot of the router and the restart of dnsmasq.
The following line appears in the config file after restarting dnsmasq manually:

no-dhcp-interface=br-lan

Adding /etc/init.d/dnsmasq restart to /etc/rc.local seems to be a workaround for the moment.


07.09.20192484Base systemBug ReportVery LowLowdnsmasq UCI configuration dhcp.@host[n].ip needs to be ...TrunkUnconfirmed Task Description

UCI configuration

dhcp.@host[n].ip

needs to be optional.

According to http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html . dhcp-host isn’t just for static leases, it can be used to specify lease time, hostname etc, so IP isn’t mandatory. Their example is “For example –dhcp-host=00:20:e0:3b:13:af,wap,infinite tells dnsmasq to give the machine with hardware address 00:20:e0:3b:13:af the name wap, and an infinite DHCP lease.”

OpenWrt currently ignores dhcp.@host[n], if IP isn’t provided. https://openwrt.org/docs/guide-user/base-system/dhcp#static_leases

09.08.20192433Base systemBug ReportVery LowLowdnsmasq exit by receive SIGTERM on boot stageTrunkUnconfirmed Task Description

- Device problem occurs on

 I'm use **MT7688 SOC(ramips)**,and use newest snapshot image **widora_neo-16m-squashfs-sysupgrade.bin**.

- Software versions of OpenWrt/LEDE release, packages, etc.

 use the newest snapshot image,and download on https://downloads.openwrt.org/snapshots/targets/ramips/mt76x8/.

- Steps to reproduce

 
 In boot stage dnsmasq will exit by receive SIGTERM, and then dnsmasq will restart. 
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[746]: exiting on receipt of SIGTERM
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: started, version 2.80 cachesize 150
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: DNS service limited to local subnets
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify dumpfile
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq-dhcp[1129]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: using local addresses only for domain test
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: using local addresses only for domain onion
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: using local addresses only for domain localhost
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: using local addresses only for domain local
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: using local addresses only for domain invalid
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: using local addresses only for domain bind
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: using local addresses only for domain lan
Thu Aug  8 19:34:58 2019 daemon.warn dnsmasq[1129]: no servers found in /tmp/resolv.conf.auto, will retry
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: read /etc/hosts - 4 addresses
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq-dhcp[1129]: read /etc/ethers - 0 addresses
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: read /etc/hosts - 4 addresses
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq[1129]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Thu Aug  8 19:34:58 2019 daemon.info dnsmasq-dhcp[1129]: read /etc/ethers - 0 addresses

06.05.20192268PackagesBug ReportVery LowLow[dnsmasq/odhcpd] uninstalling dnsmasq is deleting setti...openwrt-18.06Unconfirmed Task Description

utilising odhcpd for ipv4/6 queries led to uninstalling dnsmsaq from the system and in due course the file /etc/config/dhcp got wiped. Said file however holds the settings for odhcpd as well and thus is expected to be retained.

Since the /etc/config/dhcp holds the settings for both, dnsmasq and odhcpd, it should not be wiped if either packages gets uninstalled.

 


18.04.20192241Base systemBug ReportVery LowLowRegression for dnsmasq config option add_wan_fqdnTrunkUnconfirmed Task Description

When dnsmasq’s init script is invoked via the boot process, the UCI config option add_wan_fqdn is no longer effective. The content of /tmp/hosts/dhcp.<sect> only contains:

# auto-generated config file from /etc/config/dhcp

If dnsmasq is restarted after the network is up, it works as expected.

This is caused by commit ecd954d5302b2d135005ca68c206bb2d544b0bde, which adds some conditions to the service triggers, one being the ignore option must be disabled.
The add_wan_fqdn option only takes effect when the ignore option is enabled.

The commit message suggests the condition was added in reverse:

if the value of the ignore option is set to 0, then the corresponding interface trigger is not installed. Otherwise, if the ignore option value is 1, then procd_add_interface_trigger is called which adds the interface trigger.

I’ve confirmed that reversing the condition fixes the problem, and have attached a patch for this.

06.02.20192107Base systemBug ReportVery LowLowdnsmasq instances can read DHCP host files of all other...TrunkUnconfirmed Task Description

If multiple instances of dnsmasq are configured, then every instance has access to the DHCP host files of all other instances of dnsmasq.

For example, if two instances are configured in /etc/config/dhcp, “default” and “guest”, then when they are started (or if they receive SIGHUP), then each instance will log something like this to syslog:

Thu Feb  7 04:26:47 2019 daemon.info dnsmasq[3092]: read /tmp/hosts/odhcpd - 1 addresses
Thu Feb  7 04:26:47 2019 daemon.info dnsmasq[3092]: read /tmp/hosts/dhcp.default - 2 addresses
Thu Feb  7 04:26:47 2019 daemon.info dnsmasq[3092]: read /tmp/hosts/dhcp.guest - 2 addresses

From /etc/init.d/dnsmasq it doesn’t look like this is intentional, as procd_add_jail_mount() is called with the instance’s own host file ($HOSTFILE) only.

10.08.20181765Base systemBug ReportVery LowMediumdnsmasq-full fails to listen on dhcp socket after reboo...openwrt-18.06Waiting on reporter Task Description

When I restart my router, dnsmasq comes up and works for IPv6, but fails to serve out dhcp for ipv4.

Supply the following if possible:
- Device problem occurs on

Ubiquiti Edgerouter Lite

- Software versions of OpenWrt/LEDE release, packages, etc.

OpenWrt 18.06.0, r7188-b0b5c64c22
dnsmasq-full - 2.80test3-1

- Steps to reproduce

Reboot the router. When it comes up just after reboot, it fails to respond to DHCP requests. lsof shows that it’s not listening on port 67, and does not have /tmp/dhcp.leases open:

root@junction:~# lsof -p 1792 -P
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dnsmasq 1792 dnsmasq cwd DIR 0,15 3488 1166 /
dnsmasq 1792 dnsmasq rtd DIR 0,15 3488 1166 /
dnsmasq 1792 dnsmasq txt REG 7,0 349744 1526 /usr/sbin/dnsmasq
dnsmasq 1792 dnsmasq mem REG 7,0 16776 189 /usr/lib/libmnl.so.0.2.0
dnsmasq 1792 dnsmasq mem REG 8,2 117320 1033 /lib/libgcc_s.so.1
dnsmasq 1792 dnsmasq mem REG 8,2 25440 1114 /lib/libubus.so
dnsmasq 1792 dnsmasq mem REG 8,2 46168 1029 /lib/libubox.so
dnsmasq 1792 dnsmasq mem REG 7,0 466112 696 /usr/lib/libgmp.so.10.3.2
dnsmasq 1792 dnsmasq mem REG 7,0 206656 702 /usr/lib/libhogweed.so.4.3
dnsmasq 1792 dnsmasq mem REG 7,0 231888 704 /usr/lib/libnettle.so.6.3
dnsmasq 1792 dnsmasq mem REG 7,0 22232 216 /usr/lib/libnfnetlink.so.0.2.0
dnsmasq 1792 dnsmasq mem REG 7,0 111864 561 /usr/lib/libnetfilter_conntrack.so.3.6.0
dnsmasq 1792 dnsmasq mem REG 8,2 650896 1012 /lib/libc.so
dnsmasq 1792 dnsmasq mem REG 0,14 23 713 /tmp/TZ
dnsmasq 1792 dnsmasq 0u CHR 1,3 0t0 1226 /dev/null
dnsmasq 1792 dnsmasq 1u CHR 1,3 0t0 1226 /dev/null
dnsmasq 1792 dnsmasq 2u CHR 1,3 0t0 1226 /dev/null
dnsmasq 1792 dnsmasq 3u netlink 0t0 3561 ROUTE
dnsmasq 1792 dnsmasq 4u IPv4 3568 0t0 UDP junction:53
dnsmasq 1792 dnsmasq 5u IPv4 3569 0t0 TCP junction:53 (LISTEN)
dnsmasq 1792 dnsmasq 6u IPv4 3570 0t0 UDP localhost:53
dnsmasq 1792 dnsmasq 7u IPv4 3571 0t0 TCP localhost:53 (LISTEN)
dnsmasq 1792 dnsmasq 8u IPv6 3572 0t0 UDP localhost:53
dnsmasq 1792 dnsmasq 9u IPv6 3573 0t0 TCP localhost:53 (LISTEN)
dnsmasq 1792 dnsmasq 10r FIFO 0,8 0t0 3574 pipe
dnsmasq 1792 dnsmasq 11w FIFO 0,8 0t0 3574 pipe
dnsmasq 1792 dnsmasq 12u unix 0x800000041d16ca00 0t0 3576 type=DGRAM
dnsmasq 1792 dnsmasq 13u a_inode 0,9 0 14 [eventpoll]
dnsmasq 1792 dnsmasq 14r FIFO 0,8 0t0 3598 pipe
dnsmasq 1792 dnsmasq 15w FIFO 0,8 0t0 3598 pipe
dnsmasq 1792 dnsmasq 16u unix 0x800000041d16d900 0t0 3599 type=STREAM
dnsmasq 1792 dnsmasq 21u IPv6 3729 0t0 UDP fe80::822a:a8ff:fe4c:9dc1:53
dnsmasq 1792 dnsmasq 22u IPv6 3730 0t0 TCP fe80::822a:a8ff:fe4c:9dc1:53 (LISTEN)
dnsmasq 1792 dnsmasq 26u IPv6 3745 0t0 UDP fd90:79d3:5065:f00d::1:53
dnsmasq 1792 dnsmasq 27u IPv6 3746 0t0 TCP fd90:79d3:5065:f00d::1:53 (LISTEN)
dnsmasq 1792 dnsmasq 35u IPv6 6049 0t0 UDP cpe-2606-A000-1100-DB-0-0-0-1.dyn6.twc.com:53
dnsmasq 1792 dnsmasq 36u IPv6 6050 0t0 TCP cpe-2606-A000-1100-DB-0-0-0-1.dyn6.twc.com:53 (LISTEN)

...if I then restart it with “/etc/init.d/dnsmasq restart”, it comes up properly. The router

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dnsmasq 6861 dnsmasq cwd DIR 0,15 3488 1166 /
dnsmasq 6861 dnsmasq rtd DIR 0,15 3488 1166 /
dnsmasq 6861 dnsmasq txt REG 7,0 349744 1526 /usr/sbin/dnsmasq
dnsmasq 6861 dnsmasq mem REG 7,0 16776 189 /usr/lib/libmnl.so.0.2.0
dnsmasq 6861 dnsmasq mem REG 8,2 117320 1033 /lib/libgcc_s.so.1
dnsmasq 6861 dnsmasq mem REG 8,2 25440 1114 /lib/libubus.so
dnsmasq 6861 dnsmasq mem REG 8,2 46168 1029 /lib/libubox.so
dnsmasq 6861 dnsmasq mem REG 7,0 466112 696 /usr/lib/libgmp.so.10.3.2
dnsmasq 6861 dnsmasq mem REG 7,0 206656 702 /usr/lib/libhogweed.so.4.3
dnsmasq 6861 dnsmasq mem REG 7,0 231888 704 /usr/lib/libnettle.so.6.3
dnsmasq 6861 dnsmasq mem REG 7,0 22232 216 /usr/lib/libnfnetlink.so.0.2.0
dnsmasq 6861 dnsmasq mem REG 7,0 111864 561 /usr/lib/libnetfilter_conntrack.so.3.6.0
dnsmasq 6861 dnsmasq mem REG 8,2 650896 1012 /lib/libc.so
dnsmasq 6861 dnsmasq mem REG 0,14 23 713 /tmp/TZ
dnsmasq 6861 dnsmasq 0u CHR 1,3 0t0 1226 /dev/null
dnsmasq 6861 dnsmasq 1u CHR 1,3 0t0 1226 /dev/null
dnsmasq 6861 dnsmasq 2u CHR 1,3 0t0 1226 /dev/null
dnsmasq 6861 dnsmasq 3u REG 0,14 0 806 /tmp/dhcp.leases
dnsmasq 6861 dnsmasq 4u IPv4 10060 0t0 UDP *:bootps
dnsmasq 6861 dnsmasq 5u netlink 0t0 10061 ROUTE
dnsmasq 6861 dnsmasq 6u IPv4 10063 0t0 UDP junction:domain
dnsmasq 6861 dnsmasq 7u IPv4 10064 0t0 TCP junction:domain (LISTEN)
dnsmasq 6861 dnsmasq 8u IPv4 10065 0t0 UDP localhost:domain
dnsmasq 6861 dnsmasq 9u IPv4 10066 0t0 TCP localhost:domain (LISTEN)
dnsmasq 6861 dnsmasq 10u IPv6 10067 0t0 UDP fe80::822a:a8ff:fe4c:9dc1:domain
dnsmasq 6861 dnsmasq 11u IPv6 10068 0t0 TCP fe80::822a:a8ff:fe4c:9dc1:domain (LISTEN)
dnsmasq 6861 dnsmasq 12u IPv6 10069 0t0 UDP fd90:79d3:5065:f00d::1:domain
dnsmasq 6861 dnsmasq 13u IPv6 10070 0t0 TCP fd90:79d3:5065:f00d::1:domain (LISTEN)
dnsmasq 6861 dnsmasq 14u IPv6 10071 0t0 UDP cpe-2606-A000-1100-DB-0-0-0-1.dyn6.twc.com:domain
dnsmasq 6861 dnsmasq 15u IPv6 10072 0t0 TCP cpe-2606-A000-1100-DB-0-0-0-1.dyn6.twc.com:domain (LISTEN)
dnsmasq 6861 dnsmasq 16u IPv6 10073 0t0 UDP localhost:domain
dnsmasq 6861 dnsmasq 17u IPv6 10074 0t0 TCP localhost:domain (LISTEN)
dnsmasq 6861 dnsmasq 18r FIFO 0,8 0t0 10075 pipe
dnsmasq 6861 dnsmasq 19w FIFO 0,8 0t0 10075 pipe
dnsmasq 6861 dnsmasq 20u unix 0x800000041c446300 0t0 10077 type=DGRAM
dnsmasq 6861 dnsmasq 21u a_inode 0,9 0 14 [eventpoll]
dnsmasq 6861 dnsmasq 22r FIFO 0,8 0t0 10078 pipe
dnsmasq 6861 dnsmasq 23w FIFO 0,8 0t0 10078 pipe
dnsmasq 6861 dnsmasq 24u unix 0x800000041c445e00 0t0 10079 type=STREAM

When I restart the daemon, I see these messages in the log as well:

Fri Aug 10 09:46:50 2018 daemon.info dnsmasq-dhcp[6861]: DHCP, IP range 192.168.1.100 – 192.168.1.249, lease time 12h
Fri Aug 10 09:46:50 2018 daemon.info dnsmasq-dhcp[6861]: DHCP, sockets bound exclusively to interface br-lan

...but they are absent when the daemon starts on a clean boot.

Attaching my /etc/config/dhcp, and the output from logread.

23.05.20181559Base systemBug ReportVery LowHighSystem fails to start up correctly, with 2 dnsmasq/ujai...TrunkUnconfirmed Task Description

I have noticed frequent problems with OpenWrt trunk: about 30% of the time it doesn’t start up correctly (but it seems to boot OK and dmesg messages seem fine), ps shows two dnsmasq/ujail processes (note: I’ve been using ujail for the past 2+ years, without serious problems other than  FS#878 ).

When OpenWrt gets stuck with 2 dnsmasq/ujail processes, invoking logread produces the error: “Failed to find log object: Not found” multiple times. If I kill the ujail/dnsmasq processes OpenWrt will just reboot (!)

I’ve tested this on two different OpenWrt VMs and on two different systems running VBox 5.1 and 5.2 under Ubuntu.

Here is what a ps looks like when the LEDE VM has booted normally:

root@10.0.3.141's password: 


BusyBox v1.28.3 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r6965-9c0ddafd46
 -----------------------------------------------------
root@OpenWrt:~# ps
  PID USER       VSZ STAT COMMAND
    1 root     13384 S    /sbin/procd
    2 root         0 SW   [kthreadd]
    3 root         0 IW   [kworker/0:0]
    4 root         0 IW<  [kworker/0:0H]
    5 root         0 IW   [kworker/u2:0]
    6 root         0 IW<  [mm_percpu_wq]
    7 root         0 SW   [ksoftirqd/0]
    8 root         0 IW   [rcu_sched]
    9 root         0 IW   [rcu_bh]
   10 root         0 SW   [migration/0]
   11 root         0 SW   [cpuhp/0]
   12 root         0 IW<  [netns]
   13 root         0 IW   [kworker/u2:1]
   17 root         0 IW   [kworker/0:1]
   95 root         0 SW   [oom_reaper]
   96 root         0 IW   [kworker/u2:2]
  232 root         0 IW<  [writeback]
  234 root         0 IW<  [crypto]
  235 root         0 IW<  [kintegrityd]
  237 root         0 IW<  [kblockd]
  304 root         0 IW<  [ata_sff]
  325 root         0 IW<  [watchdogd]
  379 root         0 IW   [kworker/u2:3]
  439 root         0 SW   [kswapd0]
  525 root         0 IW<  [pencrypt]
  527 root         0 IW<  [pdecrypt]
  554 root         0 IW<  [acpi_thermal_pm]
  623 root         0 SW   [scsi_eh_0]
  624 root         0 IW<  [scsi_tmf_0]
  627 root         0 SW   [scsi_eh_1]
  638 root         0 IW<  [scsi_tmf_1]
  641 root         0 SW   [scsi_eh_2]
  642 root         0 IW<  [scsi_tmf_2]
  645 root         0 IW<  [ipv6_addrconf]
  646 root         0 IW   [kworker/u2:4]
  724 root         0 IW<  [kworker/0:1H]
  732 root         0 IW<  [ext4-rsv-conver]
  818 root         0 IW<  [ext4-rsv-conver]
  973 root      9012 S    /sbin/ubusd
  978 root      2744 S    /sbin/askfirst /usr/libexec/login.sh
  979 root      3112 S    /bin/ash --login
 1273 root         0 IW<  [cfg80211]
 1512 root      7064 S    /sbin/logd -S 64
 1743 root     15564 S    /sbin/netifd
 1800 root     11260 S    /usr/sbin/odhcpd
 1860 root      2944 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 22 -K 300 -T 3
 2149 root      3108 S    udhcpc -p /var/run/udhcpc-eth1.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth1 -x hostname:OpenWrt -C -O 121
 2162 root      3108 S    udhcpc -p /var/run/udhcpc-eth2.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth2 -x hostname:OpenWrt -C -O 121
 2169 root      3108 S    udhcpc -p /var/run/udhcpc-vlan40.pid -s /lib/netifd/dhcp.script -f -t 0 -i vlan40 -x hostname:OpenWrt -C -O 121
 2172 root      3108 S    udhcpc -p /var/run/udhcpc-vlan50.pid -s /lib/netifd/dhcp.script -f -t 0 -i vlan50 -x hostname:OpenWrt -C -O 121
 2687 root     10032 S    {dnsmasq} /sbin/ujail -n dnsmasq -u -l -r /dev/null -r /dev/urandom -r /etc/TZ -r /etc/dnsmasq.conf -r /etc/ethers -r /etc/group -r /etc/hosts -r /etc/passwd -r /sbin/hotplug-call 
 2700 dnsmasq  13612 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg01411c -k -x /var/run/dnsmasq/dnsmasq.cfg01411c.pid
 2705 root         0 IW   [kworker/0:2]
 2947 root      7092 S    /usr/sbin/softflowd -d -i eth0 -m 8192 -n 10.0.3.100:2055 -p /var/run/softflowd.pid -c /var/run/softflowd.ctl -v 5 -T full -s 100 -p /var/run/softflowd.pid
 2990 root      7908 S    /usr/lib/ipsec/starter --daemon charon --nofork
 3067 root     78176 S    /usr/lib/ipsec/charon
 3121 root      3112 S<   /usr/sbin/ntpd -n -N -S /usr/sbin/ntpd-hotplug -p 1.gr.pool.ntp.org -p 0.europe.pool.ntp.org -p 2.europe.pool.ntp.org
 3921 root      3256 S    /bin/sh /usr/sbin/mwan3track wan eth1 online 10.0.3.141 8.8.4.4 208.67.222.222
 4500 root      3256 S    /bin/sh /usr/sbin/mwan3track wan2 eth2 online 10.0.3.70 8.8.8.8 208.67.220.220
 4912 root      3060 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 22 -K 300 -T 3
 4917 root      3112 S    sleep 5
 4922 root      3112 S    sleep 5
 4923 root      3112 S    -ash
 4931 root      3108 R    ps
root@OpenWrt:~# uname -a
Linux OpenWrt 4.14.41 #0 SMP Mon May 21 16:07:48 2018 x86_64 GNU/Linux
root@OpenWrt:~# cat /etc/openwrt_*
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r6965-9c0ddafd46'
DISTRIB_TARGET='x86/64'
DISTRIB_ARCH='x86_64'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r6965-9c0ddafd46'
DISTRIB_TAINTS=''
r6965-9c0ddafd46
root@OpenWrt:~#

And here is what ps on the same system (same VM, same /etc/config etc) looks like when it fails to work correctly:

  PID USER       VSZ STAT COMMAND
    1 root     13384 S    /sbin/procd
    2 root         0 SW   [kthreadd]
    3 root         0 IW   [kworker/0:0]
    4 root         0 IW<  [kworker/0:0H]
    5 root         0 IW   [kworker/u2:0]
    6 root         0 IW<  [mm_percpu_wq]
    7 root         0 SW   [ksoftirqd/0]
    8 root         0 IW   [rcu_sched]
    9 root         0 IW   [rcu_bh]
   10 root         0 SW   [migration/0]
   11 root         0 SW   [cpuhp/0]
   12 root         0 IW<  [netns]
   13 root         0 IW   [kworker/u2:1]
   29 root         0 IW   [kworker/0:1]
   75 root         0 SW   [oom_reaper]
   76 root         0 IW   [kworker/u2:2]
  232 root         0 IW<  [writeback]
  233 root         0 IW<  [crypto]
  235 root         0 IW<  [kintegrityd]
  236 root         0 IW<  [kblockd]
  238 root         0 IW<  [ata_sff]
  325 root         0 IW<  [watchdogd]
  438 root         0 SW   [kswapd0]
  524 root         0 IW<  [pencrypt]
  526 root         0 IW<  [pdecrypt]
  545 root         0 IW<  [acpi_thermal_pm]
  622 root         0 SW   [scsi_eh_0]
  623 root         0 IW<  [scsi_tmf_0]
  626 root         0 SW   [scsi_eh_1]
  637 root         0 IW<  [scsi_tmf_1]
  640 root         0 SW   [scsi_eh_2]
  641 root         0 IW<  [scsi_tmf_2]
  644 root         0 IW<  [ipv6_addrconf]
  645 root         0 IW   [kworker/u2:3]
  646 root         0 IW   [kworker/u2:4]
  728 root         0 IW<  [kworker/0:1H]
  732 root         0 IW<  [ext4-rsv-conver]
  818 root         0 IW<  [ext4-rsv-conver]
  973 root      9016 S    /sbin/ubusd
  978 root      2744 S    /sbin/askfirst /usr/libexec/login.sh
  979 root      3112 S    /bin/ash --login
 1269 root         0 IW<  [cfg80211]
 1801 root     11328 S    /usr/sbin/odhcpd
 2697 root     10032 S    {dnsmasq} /sbin/ujail -n dnsmasq -u -l -r /dev/null 
 2705 root     10032 R    {dnsmasq} /sbin/ujail -n dnsmasq -u -l -r /dev/null 
 2759 root      3108 R    ps
14.04.20181492Base systemBug ReportVery LowMediumodhcpd triggered dnsmasq reloads spam system logTrunkUnconfirmed Task Description

odhcpd currently spams system log as it causes so many dnsmasq config reloads.

This log spam problem has been present in Openwrt/LEDE master since late 2017, when odhcpd (and/or netifd?) were changed so that the odhcpd more frequently signals dnsmasq to reload its hosts config via /usr/sbin/odhcpd-update script.

I have native ipv6 and most of my devices are ipv6 aware, so the problem is quite visible. There has been also some forum discussion about the problem, e.g. in the david wrt1900ac build thread, so others have noticed the problem, too.

As the RA lifetimes and DHCPv6 lifetimes are rather short by default, this reloading seems to happen every few minutes when a device joins or renews its address.

System log gets spammed with dnsmasq reload log lines whenever odhcpd writes the /tmp/hosts/odhcpd file and then triggers dnsmasq reload via /usr/sbin/odhcpd-update.

I added a logger statement “ ODHCPD event ” to /usr/sbin/odhcpd-update and that pretty clearly indicates the additional problem that odhcpd can cause multiple reloads inside 1-2 seconds for a single device joining and getting an address.

I am not sure what is the best approach:

  • Reduce dnsmasq reload log verbosity. Sounds more like a quick and dirty patch than an actual fix.
  • Reduce dnsmasq reloads via longer RA/DHCPv6 address lifetimes.
  • Reduce dnsmasq reloads via combining several events before triggering /usr/sbin/odhcpd-update. Currently a single device can cause multiple reloads inside a few seconds. Maybe there could be a “dirty flag” that is then evaluated once per minute and only then causes a /usr/sbin/odhcpd-update call.
  • Write /tmp/hosts/odhcpd less frequently. Evaluate the need to actually write it, or at least evaluate the need to trigger a dnsmasq reload. Currently the file gets the plain address allocations but also a # commented-out line with timestamp etc. debug info. AFAIK that is not really utilised by dnsmasq, so that is just for debug purposes. I general, if a device just renews its existing dhcpv6 address, there should be no need to reload dnsmasq because of /tmp/hosts/odhcpd (as the actual information does not change, although the debug timestamp changes)

Example of /tmp/hosts/odhcpd

2001:14ba:801f:9f00::180        Z97IW7
fd1b:7654:3210::180     Z97IW7
# br-lan 000100011b8be1ec7824af3a801c e7824af Z97IW7 -1 180 128 2001:14ba:801f:9f00::180/128 fd1b:7654:3210::180/128
2001:14ba:801f:9f00::67f        router2
fd1b:7654:3210::67f     router2
# br-lan 00030001c63dc7a33f50 1 router2 1523711242 67f 128 2001:14ba:801f:9f00::67f/128 fd1b:7654:3210::67f/128
2001:14ba:801f:9f00::dbd        Hannu650
fd1b:7654:3210::dbd     Hannu650
# br-lan 000100181e4723f200a0c6000000 d5cca1a Hannu650 1523711242 dbd 128 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128

odhcpd is not the only culprit for dnsmasq reloads, but it is very visible at least in my use case

Log below:

Sat Apr 14 11:19:36 2018 user.notice odhcpd: **** ODHCPD event ****
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: read /etc/hosts - 4 addresses
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/odhcpd - 4 addresses
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq-dhcp[3409]: read /etc/ethers - 0 addresses
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zztxdown.com
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzshw.net
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzpxw.cn
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zyjyyy.com
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zwgoca.com
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zw52.ru
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zumobi.com
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zum.mudmaggot.com
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.246#53
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.245#53
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::1#53
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::2#53
Sat Apr 14 11:19:36 2018 daemon.info dnsmasq[3409]: using 4651 more local addresses
Sat Apr 14 11:19:37 2018 daemon.warn odhcpd[1396]: DHCPV6 REQUEST IA_NA from 000100011b8be1ec7824af3a801c on br-lan: ok 2001:14ba:801f:9f00::180/128 fd1b:7654:3210::180/128
Sat Apr 14 11:19:37 2018 user.notice odhcpd: **** ODHCPD event ****
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: read /etc/hosts - 4 addresses
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/odhcpd - 6 addresses
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq-dhcp[3409]: read /etc/ethers - 0 addresses
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zztxdown.com
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzshw.net
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzpxw.cn
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zyjyyy.com
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zwgoca.com
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zw52.ru
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zumobi.com
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zum.mudmaggot.com
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.246#53
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.245#53
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::1#53
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::2#53
Sat Apr 14 11:19:37 2018 daemon.info dnsmasq[3409]: using 4651 more local addresses
Sat Apr 14 11:20:54 2018 daemon.info dnsmasq-dhcp[3409]: DHCPREQUEST(br-lan) 192.168.1.165 5c:ca:1a:2a:cd:c4
Sat Apr 14 11:20:54 2018 daemon.info dnsmasq-dhcp[3409]: DHCPACK(br-lan) 192.168.1.165 5c:ca:1a:2a:cd:c4 Hannu650
Sat Apr 14 11:20:55 2018 daemon.warn odhcpd[1396]: DHCPV6 CONFIRM IA_NA from 000100181e4723f200a0c6000000 on br-lan: not on-link 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:20:55 2018 daemon.warn odhcpd[1396]: DHCPV6 CONFIRM IA_NA from 000100181e4723f200a0c6000000 on br-lan: not on-link 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:20:56 2018 daemon.warn odhcpd[1396]: DHCPV6 CONFIRM IA_NA from 000100181e4723f200a0c6000000 on br-lan: not on-link 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:20:56 2018 daemon.warn odhcpd[1396]: DHCPV6 CONFIRM IA_NA from 000100181e4723f200a0c6000000 on br-lan: not on-link 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:20:56 2018 daemon.warn odhcpd[1396]: DHCPV6 SOLICIT IA_NA from 000100181e4723f200a0c6000000 on br-lan: ok 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:20:56 2018 user.notice odhcpd: **** ODHCPD event ****
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: read /etc/hosts - 4 addresses
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/odhcpd - 4 addresses
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq-dhcp[3409]: read /etc/ethers - 0 addresses
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zztxdown.com
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzshw.net
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzpxw.cn
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zyjyyy.com
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zwgoca.com
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zw52.ru
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zumobi.com
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zum.mudmaggot.com
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.246#53
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.245#53
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::1#53
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::2#53
Sat Apr 14 11:20:56 2018 daemon.info dnsmasq[3409]: using 4651 more local addresses
Sat Apr 14 11:20:57 2018 daemon.warn odhcpd[1396]: DHCPV6 REQUEST IA_NA from 000100181e4723f200a0c6000000 on br-lan: ok 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:20:57 2018 user.notice odhcpd: **** ODHCPD event ****
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: read /etc/hosts - 4 addresses
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/odhcpd - 6 addresses
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq-dhcp[3409]: read /etc/ethers - 0 addresses
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zztxdown.com
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzshw.net
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzpxw.cn
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zyjyyy.com
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zwgoca.com
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zw52.ru
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zumobi.com
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zum.mudmaggot.com
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.246#53
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.245#53
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::1#53
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::2#53
Sat Apr 14 11:20:57 2018 daemon.info dnsmasq[3409]: using 4651 more local addresses
Sat Apr 14 11:42:55 2018 daemon.info dnsmasq-dhcp[3409]: DHCPREQUEST(br-lan) 192.168.1.165 5c:ca:1a:2a:cd:c4
Sat Apr 14 11:42:55 2018 daemon.info dnsmasq-dhcp[3409]: DHCPACK(br-lan) 192.168.1.165 5c:ca:1a:2a:cd:c4 Hannu650
Sat Apr 14 11:42:56 2018 daemon.warn odhcpd[1396]: DHCPV6 CONFIRM IA_NA from 000100181e4723f200a0c6000000 on br-lan: not on-link 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:42:56 2018 daemon.warn odhcpd[1396]: DHCPV6 CONFIRM IA_NA from 000100181e4723f200a0c6000000 on br-lan: not on-link 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:42:57 2018 daemon.warn odhcpd[1396]: DHCPV6 CONFIRM IA_NA from 000100181e4723f200a0c6000000 on br-lan: not on-link 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:42:57 2018 daemon.warn odhcpd[1396]: DHCPV6 CONFIRM IA_NA from 000100181e4723f200a0c6000000 on br-lan: not on-link 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:42:58 2018 daemon.warn odhcpd[1396]: DHCPV6 SOLICIT IA_NA from 000100181e4723f200a0c6000000 on br-lan: ok 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:42:58 2018 user.notice odhcpd: **** ODHCPD event ****
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: read /etc/hosts - 4 addresses
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/odhcpd - 4 addresses
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq-dhcp[3409]: read /etc/ethers - 0 addresses
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zztxdown.com
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzshw.net
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzpxw.cn
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zyjyyy.com
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zwgoca.com
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zw52.ru
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zumobi.com
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zum.mudmaggot.com
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.246#53
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.245#53
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::1#53
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::2#53
Sat Apr 14 11:42:58 2018 daemon.info dnsmasq[3409]: using 4651 more local addresses
Sat Apr 14 11:42:59 2018 daemon.warn odhcpd[1396]: DHCPV6 REQUEST IA_NA from 000100181e4723f200a0c6000000 on br-lan: ok 2001:14ba:801f:9f00::dbd/128 fd1b:7654:3210::dbd/128
Sat Apr 14 11:42:59 2018 user.notice odhcpd: **** ODHCPD event ****
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: read /etc/hosts - 4 addresses
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/odhcpd - 6 addresses
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq-dhcp[3409]: read /etc/ethers - 0 addresses
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zztxdown.com
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzshw.net
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zzpxw.cn
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zyjyyy.com
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zwgoca.com
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zw52.ru
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zumobi.com
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using local addresses only for domain zum.mudmaggot.com
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.246#53
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using nameserver 62.241.198.245#53
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::1#53
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using nameserver 2001:14b8:1000::2#53
Sat Apr 14 11:42:59 2018 daemon.info dnsmasq[3409]: using 4651 more local addresses
Sat Apr 14 11:49:32 2018 daemon.err uhttpd[4310]: luci: accepted login on / for root from 192.168.1.180
20.03.20181448Base systemBug ReportVery LowLowHost file from removed dnsmasq section remains in effec...TrunkUnconfirmed Task Description

Using OpenWrt trunk, if a dnsmasq section is removed from the dhcp uci file, its host file will remain in /tmp/hosts/

To replicate:

Set the content of /etc/config/dhcp to:

config dnsmasq 'foo'

config dnsmasq 'bar'

config 'domain'
	option instance 'bar'
	option name 'baz'
	option ip '127.1.1.1'

Run:
/etc/init.d/dnsmasq reload

Set the content of /etc/config/dhcp to:

config dnsmasq 'foo'

Run:
/etc/init.d/dnsmasq reload

The file /tmp/hosts/dhcp.bar still exists, and its content will remain in effect for connected clients.

11.02.20181348Base systemBug ReportVery LowMediumdnsmasq config script doesn't handle vendorclass specif...TrunkUnconfirmed Task Description

This happens as of LEDE 17.01.4, and is a result of how /etc/init.d/dnsmasq script rebuilds the temp dnsmasq config file from the /etc/config/dhcp file.

dnsmasq supports the following construct:

dhcp-vendorclass=set:ubiquity,ubnt
dhcp-option=tag:ubiquity,1,192.168.1.10

The meaning of which would be that if a vendor string that matches ‘ubnt’ is seen, then the class ‘ubiquity’ is set against the device, any dhcp-options tagged with that class would be sent to devices so tagged.

The dhcp config files supports constructs like this:

config vendorclass ‘ubiquity’

  option vendorclass 'ubnt'
  option networkid 'vendor:ubnt'
  list dhcp_option '1,192.168.1.10'

but in this case the value of networkid is pre-pended in each case to the dhcp_option string, like so:

dhcp-vendorclass=vendor:ubnt,ubnt
dhcp-option=vendor:ubnt,1,192.168.1.10

Which works as config - but only because the vendorclass specification is not at work at all - essentially all the matching is occurring within the dhcp-option (it wouldn’t be possible to specify multiple values to be matched in the vendorclass specifier for instance).


18.11.20171177Base systemBug ReportVery LowMediumdnsmasq spams syslog on loss of WAN connectionTrunkNew Task Description

Supply the following if possible:
- Device problem occurs on

Observed on an APU2

- Software versions of LEDE release, packages, etc.

DISTRIB_ID='LEDE'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r5244-f0c37f6ceb'
DISTRIB_CODENAME='reboot'
DISTRIB_TARGET='x86/64'
DISTRIB_ARCH='x86_64'
DISTRIB_DESCRIPTION='LEDE Reboot SNAPSHOT r5244-f0c37f6ceb'
DISTRIB_TAINTS='no-all busybox'

# opkg list_installed | grep dnsmasq
dnsmasq - 2.78-2

- Steps to reproduce

In my case, I have an upstream service provisioned with pppoe. Occasionally, the pppoe session dies as the ISP does some kind of unannounced maintenance. Since updating recently from a March 2016 build of OpenWrt, when this outage occurs, dnsmasq sends many messages, like this:

Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied
Nov 16 02:03:10 192.168.80.1 dnsmasq[27288]: failed to send packet: Permission denied

nearly 30 per second.

01.11.20171137PackagesBug ReportVery LowLowdnsmasq static hosts configuration should support clien...TrunkUnconfirmed Task Description

By design, dnsmasq does not assume that two requests from the same source MAC address are for the same client if their client-id is different. Put another way, the requester is effectively identified by a <MAC,client-id> pair. This is discussed in the dnsmasq FAQ http://www.thekelleys.org.uk/dnsmasq/docs/FAQ under the question “I’m network booting my machines, and trying to give them static DHCP-assigned addresses...”

As a result, a machine that has been assigned a static address, which first requests an IP address without sending a client-id, and later makes a request with a client-id, will not be given the assigned static IP in response to the subsequent request. (The static IP will bind to the initial <MAC,client-id> pair with the null client-ID.)

To resolve this, one of the following options could be implemented:

  1. Mention the problem in the documentation, and advise the user to append “,id:*” to the MAC address if they run into this issue. (This will cause issues for luci users because this will be considered a malformed MAC address, and luci will refuse to save changes.)
  2. The dnsmasq init script could always insert “,id:*” immediately after the mac address on the generated dhcp-host configuration line.
  3. The dhcp.host entry could be extended with an “allow-any-client-id” or “ignore-client-id” boolean, which, if selected, would cause “,id:*” to be inserted as above.
  4. The dhcp.host entry could be extended with an optional “client-id” field, which would allow an explicit DHCP client-id to be set for the host. That ID could be used instead of or in addition to the existing “mac” entry. Semantics would need to be defined to make sure that the handling is well-defined.

Whichever option is chosen, the documentation should be updated. If an entry is added to the dhcp.host schema, bugs should be filed on other DHCP server packages (e.g.: isc-dhcp-server-ipv4) so that they can also implement the new functionality.

09.10.20171052Base systemBug ReportVery LowLowdnsmasq hotplug script does not work inside ujailTrunkUnconfirmed Task Description

Testing b73986a8264016883a8a7d666687a340cb810934 on ipq806x (C2600, specifically), using dnsmasq inside ujail fails to run hotplug events because /lib/functions.sh is unavailable inside the jail:

Mon Oct 9 20:13:53 2017 daemon.debug dnsmasq-script[1]: /sbin/hotplug-call: .: line 6: can’t open ‘/lib/functions.sh’ Mon Oct 9 20:13:53 2017 daemon.warn dnsmasq[1]: script process exited with status 2

Unfortunately, the fix is not as simple as adding /lib/functions.sh to the jail mount, as that results in the uninformative

Mon Oct 9 20:15:35 2017 daemon.warn dnsmasq[1]: script process exited with status 1

Suggestions?

18.06.2017853Base systemBug ReportVery LowLowChange dnsmasq domain and local options to listsTrunkAssigned Task Description

On LEDE 17.01 ‘domain’ and ‘local’ options in dnsmasq configuration doesn’t correctly support lists values as per dnsmasq capabilities.

Steps to reproduce

#/etc/config/dhcp
[...]
config dnsmasq
        list domain 'example1.com,192.168.0.0/24'
        list domain 'example2.com,192.168.1.0/24'
        list local '/example1.com/'
        list local '/example2.com/'
[...]

$ uci commit dhcp
$ /etc/init.d/dnsmasq restart

Actual results

#/var/etc/dnsmasq.conf.cfg02411c
[...]
domain=example1.com,192.168.0.0/24 example2.com,192.168.1.0/24
local=/example1.com/ /example2.com/
[...]

Expected results

#/var/etc/dnsmasq.conf.cfg02411c
[...]
domain=example1.com,192.168.0.0/24
domain=example2.com,192.168.1.0/24
local=/example1.com/
local=/example2.com/
[...]

Workaround

Replace append_parm with config_list_foreach here resolve the issue.
I’m attaching a patch for the 17.01 dnsmasq init script but it will break old uci configuration that use ‘option’ instead of ‘list’.
Do you have any suggestion on how to migrate old configuration and set those parameters as lists in uci web interface?

09.03.2017611Base systemBug ReportVery LowHighdnsmasq Ignore resolv file option forget at restartAllUnconfirmed Task Description

If you set up dnsmasq to ignore resolv file it will ignore it until reboot is performed. To make ignore it again the option must be uncheck and apply and then check and apply again.

I have /etc/resolv.conf as a symlink to /tmp/resolv.conf, when the router boots up the contents are the dns offered from dhcp over the wan interface. When the ignore resolv option is checked or unchecked the contens are overwrited to search lan and nameserver 127.0.0.1 but it doesn’t seems to affect as if you uncheck ignore resolv the router resolv names, and when you check again the option it can resolv names even the contents still are search lan and nameserver 127.0.0.1.

I haven’t seen yet any other change that can cause the reboot to make dnsmasq follow resolv file when the option is checked until you uncheck-apply and check-apply.

Showing tasks 1 - 24 of 24 Page 1 of 1

Available keyboard shortcuts

Tasklist

Task Details

Task Editing