Dnsmasq failing since 2-3 weeks

Hi Everyone,

Since like 2-3 weeks I have a constant issue with dnsmasq. It stops working and logging error:

dnsmasq[1]: failed to send packet: Resource temporarily unavailable

There is nothing in logs what will indicate obvious issues. Upstream DNS servers are fine. What I usually do is restarting dnsmasq service and it starts working again for few hours (sometimes minutes). I was running OpenWrt 24.10.0 when this issue started. I updated to latest stable OpenWrt 24.10.1 and issue persist. I even installed dnsmasq-full to see if this fix it.

I ended up with writing my shell script which test each few minutes if dnsmasq responds on LAN interface to DNS query and restart it if not.

I run OpenWrt for 3 or even 4 years and I haven't got any serious issues until now. My hardware is BT Home Hub 5A (lantiq/xrx200).

Does anybody have some ideas where to look to solve this issues.
I may end up with configuring whole router from scratch but I have quite big configuration (multiple zones, lots of static ip leaeses and few more things) and I'm trying to avoid this.

1 Like

Let's see your /etc/config/dhcp and network files, please.

Interesting...an old thread, a user had such a large network config.

Below are important bits from dhcp and network config files.

/etc/config/dhcp:

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'
	option sequential_ip '1'
	option allservers '1'
	list notinterface 'wan'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '140'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option dns_service '0'

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

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '3'

/etc/config/network:

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdb5:05fa:cb6b::/48'
	option packet_steering '1'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'b'
	option ds_snr_offset '0'
	option xfer_mode 'ptm'
	option line_mode 'vdsl'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'
	option ipv6 '0'

config device
	option name 'lan1'
	option macaddr 'd0:57:94:b0:a4:aa'

config device
	option name 'lan2'
	option macaddr 'd0:57:94:b0:a4:aa'

config device
	option name 'lan3'
	option macaddr 'd0:57:94:b0:a4:aa'

config device
	option name 'lan4'
	option macaddr 'd0:57:94:b0:a4:aa'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.254'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option delegate '0'

config device
	option name 'dsl0'
	option macaddr 'xx:xx:xx:xx:xx:xx'
	option ipv6 '0'

config interface 'wan'
	option device 'dsl0.101'
	option proto 'pppoe'
	option ipv6 '1'
	option mtu '1500'

config device
	option type '8021q'
	option ifname 'dsl0'
	option vid '101'
	option name 'dsl0.101'
	option ipv6 '0'

config interface 'dmz'
	option proto 'static'
	option device 'wan'
	option ipaddr '192.168.2.254'
	option netmask '255.255.255.0'
	option delegate '0'

config device
	option name 'wan'
	option ipv6 '0'

For testing purpose I decided to downgrade OpenWrt version to previous mayor release 23.05.5 and all issues disappeared. I'm running this version for currently 24 hours and it was no single issue with dnsmasq.
Maybe 24 hours is not enough for saying that issues is gone but will wee after few days.

Comparing two versions:

OpenWrt 23.05.5, r24106-10cc5fcd00
Linux router 5.15.167 #0 SMP Mon Sep 23 12:34:46 2024 mips GNU/Linux
dnsmasq - 2.90-2
OpenWrt 24.10.1, r28597-0425664679
Linux ap1.pelech.net 6.6.86 #0 SMP Sun Apr 13 16:38:32 2025 mips GNU/Linux
dnsmasq - 2.90-r4

Maybe there is issue with 6.x kernel version or something was added to new release of dnsmasq ?

my 24.10.1 is using a different version of dnsmasq, or is it a C&P error ?

 OpenWrt 24.10.1, r28597-0425664679
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# opkg list-installed  | grep dns
dnsmasq - 2.90-r4
2 Likes

Yeah. It was copy/paste "typo". Corrected in my previous answer.
Thanks

Looks like all is fine after downgrading to version 23.05.5. No single issue.

I can confirm that after all these days since I downgraded firmware to version 23.05.5 I had no single issue with dnsmasq.

I did not use the conservation of the transition to 24.10.1, I tuned it from scratch and no problem

monsoft, I have exact same issue as yours. I tried 24.10.1, 24.10.2 and 24.10.3, all the same. Because my router is Archer C7 v4, I also tried ath10k, ath10k-ct, ath10k-ct-smallbuffers, all the same. The only way to fix the issue is downgrading to 23.05.5.

24.10 is very frustrated.

The error message printed by dnsmasq is not dnsmasq fault. Reading the source code of dnsmasq, it tries to resend when receiving EAGAIN or EWOULDBLOCK which means the interface is not working. The problem seems on ath10k but the interesting is the qcom, ct, ct-smallbuffers all have problem. The other interesting thing is even dnsmasq cannot use the interface, the 5G AP is still working so the wifi clients still can ping and access the router.

So for Archer C7 v4, 24.10.x is quite unusable unless only 2.4G WiFi is being used.

I bought a new TP-Link Archer A7 and still see the exact same problem on 24.10.3.

There is no staled configs from the 23.05.x. And the issue can’t be be with the configs.

Let's see your configs:

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
cat /etc/config/firewall

I have seen the same problem on both alix2 (with no wifi, a build from about a year ago) and meraki,mr24 (built the end of June) and others. Restarting (i.e. /etc/init.d/dnsmasq restart) and the problem goes away. netstat -an doesn’t show any kind of resource exhaustion. I wonder if it is related to running in ujail? I have a fleet of about 50 gateway devices of various models, and there are just a smattering of cases over, say, 2025-to-date.

root@spot:~# ubus call system board
{
	"kernel": "6.6.59",
	"hostname": "spot",
	"system": "Atheros AR9344 rev 2",
	"model": "TP-Link TL-WDR3600 16M",
	"board_name": "tplink,tl-wdr3600-16m",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"description": "OpenWrt SNAPSHOT",
		"revision": "r28012+1-31f1dabb4b97",
		"target": "ath79/generic",
		"builddate": "1730957744"
	}
}
root@hail:~# ubus call system board
{
	"kernel": "6.6.59",
	"hostname": "hail",
	"system": "e6500, altivec supported",
	"model": "WatchGuard Firebox M300",
	"board_name": "watchguard,firebox-m300",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"revision": "r28033-5b406bccacca",
		"target": "qoriq/generic",
		"description": "OpenWrt SNAPSHOT r28033-5b406bccacca",
		"builddate": "1731069434"
	}
}
root@dull:~# ubus call system board
{
	"kernel": "6.6.74",
	"hostname": "dull",
	"system": "Atheros AR7161 rev 2",
	"model": "Buffalo WZR-600DHP",
	"board_name": "buffalo,wzr-600dhp",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"firmware_url": "https://downloads.openwrt.org/",
		"revision": "r28740-cfca9d689459",
		"target": "ath79/generic",
		"description": "OpenWrt SNAPSHOT r28740-cfca9d689459",
		"builddate": "1738524145"
	}
}
root@jump:~# ubus call system board
{
	"kernel": "6.6.95",
	"hostname": "jump",
	"system": "APM821XX",
	"model": "Meraki MR24 Access Point",
	"board_name": "meraki,mr24",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"firmware_url": "https://downloads.openwrt.org/",
		"revision": "r30251-52e339b8eda3",
		"target": "apm821xx/nand",
		"description": "OpenWrt SNAPSHOT r30251-52e339b8eda3",
		"builddate": "1751285071"
	}
}
root@bowser:~# ubus call system board
{
	"kernel": "6.6.93",
	"hostname": "bowser",
	"system": "MediaTek MT7621 ver:1 eco:3",
	"model": "Ubiquiti EdgeRouter X",
	"board_name": "ubnt,edgerouter-x",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"firmware_url": "https://downloads.openwrt.org/",
		"revision": "r30003-6dffaf931675",
		"target": "ramips/mt7621",
		"description": "OpenWrt SNAPSHOT r30003-6dffaf931675",
		"builddate": "1749408139"
	}
}
root@dunk:~# ubus call system board
{
	"kernel": "6.6.59",
	"hostname": "dunk",
	"system": "Atheros AR7161 rev 2",
	"model": "Buffalo WZR-600DHP",
	"board_name": "buffalo,wzr-600dhp",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"description": "OpenWrt SNAPSHOT",
		"revision": "r28012-31f1dabb4b97",
		"target": "ath79/generic",
		"builddate": "1730760038"
	}
}
root@loki:~# ubus call system board
{
	"kernel": "6.6.57",
	"hostname": "loki",
	"system": "APM821XX",
	"model": "Meraki MR24 Access Point",
	"board_name": "meraki,mr24",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"description": "OpenWrt SNAPSHOT",
		"revision": "r27865-caf29ee97b45",
		"target": "apm821xx/nand",
		"builddate": "1729536895"
	}
}
root@seed:~# ubus call system board
{
	"kernel": "6.6.59",
	"hostname": "seed",
	"system": "Atheros AR7161 rev 2",
	"model": "Buffalo WZR-600DHP",
	"board_name": "buffalo,wzr-600dhp",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"description": "OpenWrt SNAPSHOT",
		"revision": "r28012-31f1dabb4b97",
		"target": "ath79/generic",
		"builddate": "1730760038"
	}
}

While changing the Kernel module.... Did you have also swapped the firmware?
A miss match between module and firmware results in funny issues too...