I have noticed recently some issues in resolving. Internet works fine, that means pinging to some IP address works. However I noticed that dnsmasq is not responding to queries, the logs are pilling up with
Mon Nov 7 07:41:29 2022 daemon.err dnsmasq[5359]: failed to send packet: Operation not permitted
and the Recv-Q
and Send-Q
in netstat are increasing a lot.
Following the discussion from this post by @ldir, I am posting the strace results, in case it can provide any help understanding the problem.
root@barracuda:[~]#strace -Z --trace=sendmsg -p 30892
strace: Process 30892 attached
sendmsg(11, {msg_name={sa_family=AF_INET, sin_port=htons(48417), sin_addr=inet_addr("10.0.2.1")}, msg_namelen=16, msg_iov=[{iov_base="q&\201\203\0\1\0\0\0\1\0\0\1c\1f\19\1a\0014\0013\0015\0013\0010\0015"..., iov_len=172}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = -1 EPERM (Operation not permitted)
sendmsg(11, {msg_name={sa_family=AF_INET, sin_port=htons(48417), sin_addr=inet_addr("10.0.2.1")}, msg_namelen=16, msg_iov=[{iov_base="\302\354\205\200\0\1\0\1\0\0\0\0\00250\0012\0010\00210\7in-addr\4a"..., iov_len=64}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = -1 EPERM (Operation not permitted)
^Cstrace: Process 30892 detached
root@barracuda:[~]#readlink /proc/30892/fd/11
socket:[196094017]
root@barracuda:[~]#grep 196094017 /proc/30892/net/*
/proc/30892/net/udp: 1935: 0102000A:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 196094017 2 0000000080e95bd3 0
root@barracuda:[~]#ubus call system board
{
"kernel": "5.4.188",
"hostname": "barracuda",
"system": "Intel(R) Celeron(R) CPU N3350 @ 1.10GHz",
"model": "Barracuda Networks, Inc Barracuda NG Firewall F12",
"board_name": "barracuda-networks-inc-barracuda-ng-firewall-f12",
"release": {
"distribution": "OpenWrt",
"version": "21.02.3",
"revision": "r16554-1d4dea6d4f",
"target": "x86/64",
"description": "OpenWrt 21.02.3 r16554-1d4dea6d4f"
}
}
dnsmasq-full - 2.85-8
config dnsmasq 'lan_dns'
option domainneeded '1'
option localise_queries '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases.lan'
option domain 'mrv'
option local '/mrv/'
option tftp_root '/tmp/'
option dhcp_boot 'vmlinux'
option enable_tftp '1'
option queryport '5354'
option filterwin2k '1'
option sequential_ip '1'
option rebind_protection '0'
option confdir '/tmp/dnsmasq.d'
option localservice '0'
option localuse '1'
list interface 'lan'
list interface 'elvetias'
list interface 'roadwarrior'
list server '127.0.0.1'
list server '::1'
list server '78.47.140.199'
list server '127.0.0.1#5453'
list server '::1#5453'
list server '/elv/10.0.1.1'
option dnsseccheckunsigned '0'
list notinterface 'loopback'
option noresolv '1'
option allservers '0'
option quietdhcp '1'
After a restart it starts working again.