Frequent dnsmasq error

Hello there.

My system:

Model TP-Link Archer A7 v5
Architecture Qualcomm Atheros QCA956X ver 1 rev 0
Target Platform ath79/generic
Firmware Version OpenWrt 24.10.0 r28427-6df0e3d02a / LuCI openwrt-24.10 branch 25.333.84481~f8d85b4
Kernel Version 6.6.73

Every so often, all clients have sluggish or non-responsive network activity. I log into the openwrt router and check the system logs. This error shows up repeatedly:

Mon Dec 8 07:50:43 2025 daemon.err dnsmasq[1]: failed to send packet: Resource temporarily unavailable
Mon Dec 8 07:50:43 2025 daemon.err dnsmasq[1]: failed to send packet: Resource temporarily unavailable
Mon Dec 8 07:50:43 2025 daemon.err dnsmasq[1]: failed to send packet: Resource temporarily unavailable
Mon Dec 8 07:50:44 2025 daemon.err dnsmasq[1]: failed to send packet: Resource temporarily unavailable
Mon Dec 8 07:50:44 2025 daemon.err dnsmasq[1]: failed to send packet: Resource temporarily unavailable

I can issue the command “service dnsmasq restart” and then the router behaves normally and all clients work fine.

So the million-dollar question is, how can I determine the cause of that error and fix it?

Thanks!

start by upgrading to 24.10.4.

(After upgrading the device eg using owut tool)
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 (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

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/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Is there a known bug with dnsmasq in the version I have?

You got one at your hand maybe.

if the issue goes away post upgrade, we'll know :wink:

Here are the contents you requested.

# ubus call system board

{
"kernel": "6.6.73",
"hostname": "DeerHerd",
"system": "Qualcomm Atheros QCA956X ver 1 rev 0",
"model": "TP-Link Archer A7 v5",
"board_name": "tplink,archer-a7-v5",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "24.10.0",
"revision": "r28427-6df0e3d02a",
"target": "ath79/generic",
"description": "OpenWrt 24.10.0 r28427-6df0e3d02a",
"builddate": "1738624177"
# cat /etc/config/network

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

config globals 'globals'
option ula_prefix 'fd91:1c47:6c15::/48'
option packet_steering '1'

config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'

config interface 'lan'
option proto 'static'
option ipaddr '192.168.91.1'
option netmask '255.255.255.0'
option ip6assign '60'
option device 'br-lan'

config device
option name 'eth0'

config device
option name 'eth0.1'
option type '8021q'
option ifname 'eth0'
option vid '1'

config device
option name 'eth0.2'
option macaddr 'XX:XX:XX:XX:XX:XX'

config interface 'wan'
option proto 'dhcp'
option peerdns '0'
option device 'eth0.2'
option hostname '*'
option type 'bridge'
list dns '1.1.1.1'
list dns '8.8.8.8'

config interface 'wan6'
option proto 'dhcpv6'
option reqprefix 'auto'
option reqaddress 'try'
option device 'eth0.2'
option peerdns '0'
option type 'bridge'
option norelease '1'
list dns '2606:4700:4700::1111'
list dns '2001:4860:4860::8888'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '2 3 4 5 0t'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 0t'
# cat /etc/config/wireless

config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11a'
option path 'pci0000:00/0000:00:00.0'
option channel 'auto'
option country 'US'
option htmode 'VHT20'
option cell_density '0'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option encryption 'psk2'
option key 'xxxxxx'
option ieee80211w '1'
option ssid 'yyyyyy'

config wifi-device 'radio1'
option type 'mac80211'
option hwmode '11g'
option path 'platform/ahb/18100000.wmac'
option channel 'auto'
option country 'US'
option log_level '1'
option htmode 'HT20'
option cell_density '0'

config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option key 'xxxxxx'
option ieee80211w '1'
option ssid 'yyyyyy'
option encryption 'psk2'

# cat /etc/config/dhcp

config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option localservice '1'
option port '53'
option cachesize '0'
option filterwin2k '1'

config dhcp 'lan'
option interface 'lan'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option force '1'
option start '2'
option limit '99'
option dhcpv6 'server'
option ra_management '1'
option ra 'server'
option leasetime '24h'

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 '4'
option piofolder '/tmp/odhcpd-piofolder'

config domain
option name 'www.google.com'
option ip '216.239.38.120'


cat /etc/config/firewall

config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option drop_invalid '1'
option synflood_protect '1'

config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'

config zone
option name 'wan'
option output 'ACCEPT'
option masq '1'
option mtu_fix '1'
option log '1'
option forward 'REJECT'
option input 'REJECT'
list network 'wan'
list network 'wan6'

config forwarding
option src 'lan'
option dest 'wan'

config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'

config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
option enabled '0'

config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'

config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fc00::/6'
option dest_ip 'fc00::/6'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'

config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'

config rule
option name 'Support-UDP-Traceroute'
option src 'wan'
option dest_port '33434:33689'
option proto 'udp'
option family 'ipv4'
option target 'REJECT'
option enabled '0'

config include
option path '/etc/firewall.user'

not really, since you were asked to upgrade 1st.

This is wrong (firewall)

config defaults
option input 'ACCEPT'

original was https://github.com/openwrt/firewall4/blob/master/root/etc/config/firewall

After my last post, I did the upgrade that was suggested, but it totally nuked the device. It became completely unresponsive and unusable. Couldn’t even log into it. Fortunately I had a backup device in storage (same exact hardware model) which I pulled out and did a fresh install of OpenWRT
OpenWrt 24.10.0 r28427-6df0e3d02a / LuCI openwrt-24.10 branch 25.340.26705~d88390b

(All firewall-related settings are thus far untouched from a fresh install.)

I spent 14 hours yesterday restoring the config and getting the replacement up and running. So, I’m not exactly keen to try 24.10.4 again at this point.

Unfortunately the 24.10.0 on the replacement is giving the same error as the earlier unit:

Tue Dec 9 07:13:05 2025 daemon.err dnsmasq[1]: failed to send packet: Resource temporarily unavailable

I can restore functionality by restarting the dnsmasq process but it only lasts so long before the error returns. It bears the symptoms of a memory leak. My intent in posting this request is to troubleshoot whatever is going on with dnsmasq. I’d like to know if there was a known issue with the dnsmasq version in 24.10.0 that was resolved in 24.10.4.

Side note. I’ve been using OpenWRT for about 15 years, and for the past 5 years on the same TP-Link A7. It has been rock solid stable. I had not made any recent config changes. Only do the recommended updates from time to time. Something in the last update seems to have introduced instability as this has not been an issue until recently.

I appreciate the help you all have offered.

define updates ?


Upgrading packages (via the CLI opkg upgrade command or the LuCI Upgrade... button) can result in major problems. It is generally highly discouraged, unless you know what you are doing or if there is specific instruction to do so.

From time to time, I will do the updates via Luci in the System > Software > Updates tab. I did not know this was discouraged, that is counter-intuitive to me. But that’s a sidebar conversation at this point.

Presently I need to get the router stable again. I need to isolate the problem with dnsmasq going haywire. The fresh install I mentioned is pretty much vanilla. No firewall mods, no extra modules or packages installed. All config was performed through the Luci interface.

That is wrong approach, it will fill your overlay space and sooner or later update some critical components out of sync. Use owut or luci-app-attendedsysupgrade to keep your packages updated in squashfs and configs in overlay over upgrade.

The error itself potentially indicates that the device is overloaded - it's a 128MB RAM device, which could be exhausted if there's a lot of connections being made.

When it next happens, see what the main status page tells you - how much RAM is in use, how many connected devices, how many DHCP leases, what the firewall status is etc. Also check if all the storage is full (which it could be).

This looks like an EAGAIN error.

For starters (when it happens again), run netstat -nlp | grep 'Send-Q\|dnsmasq' to see on which interface the socket buffers are full.

1 Like

Thanks for the advice and guidance, but we can close this thread.

I was unable to get OpenWRT working. Two of us in the household work from home, which we could not do. I had no choice but to pick up something at Best Buy so we could get back online.

Really sad to be leaving the OpenWRT universe, but I need a toaster, not a hobby. I will probably have to buy a new off-the-shelf router at Best Buy every couple years since these things lose support quickly. It’s a cost vs risk decision for me. I’m sure some will disagree but I ran out of time to tinker with the OpenWRT solution and just needed something that worked.

Thanks again for advice and time spent to assist.

Signing out ~~

Get a x86 wired only router off eBay, they start at $30.
Repurpose the A7 as AP.

If you want an AIO solution, SAX1V1K, also $30 on eBay.
Will run laps around your A7 in every way, although a PITA to flash.

I have been having the same error on and off as well, possibly for the entire 24.10 train. All of my devices are ipq40xx. I build my own images and have been on 24.10.4 for a while now. The below build date translates to “Sun Oct 19 12:37:45 EDT 2025”.

# cat /etc/os-release 
NAME="OpenWrt"
VERSION="24.10.4"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 24.10.4"
VERSION_ID="24.10.4"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r28959-29397011cc"
OPENWRT_BOARD="ipq40xx/generic"
OPENWRT_ARCH="arm_cortex-a7_neon-vfpv4"
OPENWRT_TAINTS="no-all busybox"
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 24.10.4 r28959-29397011cc"
OPENWRT_BUILD_DATE="1760891865"
# strace -f -p 32107                                                                                                                                                                                                                                                      
strace: Process 32107 attached                                                                                                                                                                                                                                                            
nanosleep({tv_sec=0, tv_nsec=10000}, 0xbe8df9d0) = 0                                                                                                                                                                                                                                      
sendmsg(10, {msg_name={sa_family=AF_INET, sin_port=htons(61690), sin_addr=inet_addr("10.1.0.123")}, msg_namelen=16, msg_iov=[{iov_base="REDACTED"..., iov_len=80}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)                                                                                                                                                                                                                                                                     
nanosleep({tv_sec=0, tv_nsec=10000}, 0xbe8df9d0) = 0                                                                                                                                                                                                                                      
sendmsg(10, {msg_name={sa_family=AF_INET, sin_port=htons(61690), sin_addr=inet_addr("10.1.0.123")}, msg_namelen=16, msg_iov=[{iov_base="REDACTED"..., iov_len=80}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)                                                                                                                                                                                                                                                                     
nanosleep({tv_sec=0, tv_nsec=10000}, 0xbe8df9d0) = 0                                                                                                                                                                                                                                      
sendmsg(10, {msg_name={sa_family=AF_INET, sin_port=htons(61690), sin_addr=inet_addr("10.1.0.123")}, msg_namelen=16, msg_iov=[{iov_base="REDACTED"..., iov_len=80}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)

… and so on in a loop. Network connectivity is still up as I can ping the external DNS server, but all DNS queries to the router fail. Restarting dnsmasq gets things going again. I also feel this has been an issue since 24.10.

ETA: that IP address (10.1.0.123) is my Schlage smart door lock. I’m not sure if that could be playing into why a send buffer may be backing up. I’ll check for aliveness next time this happens.

This happened again today, same loop but switching IP addresses in sin_addr every so often.

# netstat -nlp | grep 'Send-Q\|dnsmasq'                                                                                                                                                                                                                                   
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name                                                                                                                                                                                          udp        0 180480 10.1.0.6:53             0.0.0.0:*                           13489/dnsmasq

There is a udp socket listed above, but it appears to not want to display…

udp uses single socket for all clients.
if dnsmasq is still running

killall -s USR1 dnsmasq
logread-e dnsmasq

from the log output find cache and ipstream dns statistics

The probmem is we still do not know which resource runs short.