You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LLMNR causes 1 second delay resolving DNS RRs for local. & incorrect result (SERVFAIL) #16233
resolved should match the behaviour of other DNS resolvers:
$ time host -v -t aaaa local. 192.168.1.1
Trying "local"
Using domain server:
Name: 192.168.1.1
Address: 192.168.1.1#53
Aliases:
Host local. not found: 3(NXDOMAIN)
Received 23 bytes from 192.168.1.1#53 in 4 ms
Received 23 bytes from 192.168.1.1#53 in 4 ms
real 0m0.030s
user 0m0.016s
sys 0m0.010s
Unexpected behaviour you saw
This takes 1 second and the result is SERVFAIL:
$ time host -v -t SOA local.
Trying "local"
Host local not found: 2(SERVFAIL)
Received 23 bytes from 127.0.0.53#53 in 815 ms
real 0m0.951s
user 0m0.015s
sys 0m0.020s
Steps to reproduce the problem /etc/resolv.conf is symlinked to /run/systemd/resolve/stub-resolv.conf and consequently contains 127.0.0.53 as its only nameserver.
I haven't customised resolved.conf on this machine. Consequently MDNS is not enabled on any interface.
$ resolvectl mdns
Global: yes
Link 4 (virbr0-nic): no
Link 3 (virbr0): no
Link 2 (wlp2s0): no
Why this matters
All NSS lookups for MDNS names take 1 second to complete:
$ time getent ahosts foo.local
192.168.1.11 STREAM foo.local
192.168.1.11 DGRAM
192.168.1.11 RAW
real 0m1.039s
user 0m0.005s
sys 0m0.005s
This is because Avahi's MDNS modules attempts to detect whether local is a real DNS zone (by doing a SOA lookup for local) before they actually ask Avahi to perform name resolution. Consequently, resolved is consulted, and the 1 second delay occurs for every name lookup.
Whether it matters that the result from resolved is SERVFAIL rather than NXDOMAIN, I don't know. But I think resolved should return NXDOMAIN when the label local is resolved unless it really does know about a local. DNS zone.
[1681850.721625] systemd-resolved[2827832]: Got DNS stub UDP query packet for id 46193
[1681850.773362] systemd-resolved[2827832]: Looking up RR for local IN SOA.
[1681850.773579] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681850.774285] systemd-resolved[2827832]: Transaction 60074 for <local IN SOA> scope llmnr on wlp2s0/INET6.
[1681850.774452] systemd-resolved[2827832]: Delaying llmnr transaction for 13379us.
[1681850.775358] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681850.775511] systemd-resolved[2827832]: Transaction 51637 for <local IN SOA> scope dns on wlp2s0/*.
[1681850.775631] systemd-resolved[2827832]: Using feature level UDP for transaction 51637.
[1681850.777043] systemd-resolved[2827832]: Using DNS server 192.168.1.1 for transaction 51637.
[1681850.777395] systemd-resolved[2827832]: Sending query packet with id 51637.
[1681850.778118] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681850.778293] systemd-resolved[2827832]: Transaction 6278 for <local IN SOA> scope llmnr on wlp2s0/INET.
[1681850.778742] systemd-resolved[2827832]: Delaying llmnr transaction for 4355us.
[1681850.778893] systemd-resolved[2827832]: Processing query...
[1681850.779091] systemd-resolved[2827832]: Processing incoming packet on transaction 51637 (rcode=NXDOMAIN).
[1681850.779667] systemd-resolved[2827832]: Transaction 51637 for <local IN SOA> on scope dns on wlp2s0/* now complete with <rcode-failure> from network (unsigned).
[1681850.779822] systemd-resolved[2827832]: Timeout reached on transaction 60074.
[1681850.780587] systemd-resolved[2827832]: Retrying transaction 60074.
[1681850.782584] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681850.784632] systemd-resolved[2827832]: Transaction 60074 for <local IN SOA> scope llmnr on wlp2s0/INET6.
[1681850.784796] systemd-resolved[2827832]: Sending query packet with id 60074 on interface 2/AF_INET6.
[1681850.784929] systemd-resolved[2827832]: Timeout reached on transaction 6278.
[1681850.785045] systemd-resolved[2827832]: Retrying transaction 6278.
[1681850.785149] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681850.785261] systemd-resolved[2827832]: Transaction 6278 for <local IN SOA> scope llmnr on wlp2s0/INET.
[1681850.785374] systemd-resolved[2827832]: Sending query packet with id 6278 on interface 2/AF_INET.
[1681851.036196] systemd-resolved[2827832]: Timeout reached on transaction 60074.
[1681851.037015] systemd-resolved[2827832]: Retrying transaction 60074.
[1681851.037649] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681851.041561] systemd-resolved[2827832]: Transaction 60074 for <local IN SOA> scope llmnr on wlp2s0/INET6.
[1681851.042335] systemd-resolved[2827832]: Sending query packet with id 60074 on interface 2/AF_INET6.
[1681851.042921] systemd-resolved[2827832]: Timeout reached on transaction 6278.
[1681851.044940] systemd-resolved[2827832]: Retrying transaction 6278.
[1681851.045765] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681851.046505] systemd-resolved[2827832]: Transaction 6278 for <local IN SOA> scope llmnr on wlp2s0/INET.
[1681851.047138] systemd-resolved[2827832]: Sending query packet with id 6278 on interface 2/AF_INET.
[1681851.283277] systemd-resolved[2827832]: Timeout reached on transaction 60074.
[1681851.283871] systemd-resolved[2827832]: Retrying transaction 60074.
[1681851.284311] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681851.284653] systemd-resolved[2827832]: Transaction 60074 for <local IN SOA> scope llmnr on wlp2s0/INET6.
[1681851.284979] systemd-resolved[2827832]: Sending query packet with id 60074 on interface 2/AF_INET6.
[1681851.285507] systemd-resolved[2827832]: Timeout reached on transaction 6278.
[1681851.285904] systemd-resolved[2827832]: Retrying transaction 6278.
[1681851.289848] systemd-resolved[2827832]: Cache miss for local IN SOA
[1681851.290874] systemd-resolved[2827832]: Transaction 6278 for <local IN SOA> scope llmnr on wlp2s0/INET.
[1681851.293312] systemd-resolved[2827832]: Sending query packet with id 6278 on interface 2/AF_INET.
[1681851.533763] systemd-resolved[2827832]: Timeout reached on transaction 60074.
[1681851.534399] systemd-resolved[2827832]: Retrying transaction 60074.
[1681851.534705] systemd-resolved[2827832]: Transaction 60074 for <local IN SOA> on scope llmnr on wlp2s0/INET6 now complete with <not-found> from none (unsigned).
[1681851.535030] systemd-resolved[2827832]: Timeout reached on transaction 6278.
[1681851.535550] systemd-resolved[2827832]: Retrying transaction 6278.
[1681851.535799] systemd-resolved[2827832]: Transaction 6278 for <local IN SOA> on scope llmnr on wlp2s0/INET now complete with <not-found> from none (unsigned).
[1681851.536015] systemd-resolved[2827832]: Freeing transaction 60074.
[1681851.539589] systemd-resolved[2827832]: Freeing transaction 51637.
[1681851.540909] systemd-resolved[2827832]: Sending response packet with id 46193 on interface 1/AF_INET.
[1681851.541821] systemd-resolved[2827832]: Freeing transaction 6278.
So the delay is caused by LLMNR. A lookup for foo.local does not go via LLMNR, so perhaps a lookup for local itself should also bypass LLMNR?
changed the title [-]1 second delay resolving RRs for local. & incorrect result (`SERVFAIL`)[/-][+]LLMNR causes 1 second delay resolving DNS RRs for local. & incorrect result (`SERVFAIL`)[/+]on Jun 27, 2020
Activity
yrro commentedon Jun 21, 2020
Debug log messages from
resolved:So the delay is caused by LLMNR. A lookup for
foo.localdoes not go via LLMNR, so perhaps a lookup forlocalitself should also bypass LLMNR?[-]1 second delay resolving RRs for local. & incorrect result (`SERVFAIL`)[/-][+]LLMNR causes 1 second delay resolving DNS RRs for local. & incorrect result (`SERVFAIL`)[/+]resolved: don't resolve "local." via LLMNR
resolved: don't resolve "local." via LLMNR