Repository navigation
Closed
Description
systemd version the issue has been seen with
237-3ubuntu10.3
Used distribution
Ubuntu 18.04
Expected behaviour you didn't see
After doing a CNAME lookup that returns NODATA, subsequent A lookups should continue to resolve.
Unexpected behaviour you saw
Instead, got NODATA returned from cache from previous CNAME look-up when doing new A lookup.
Steps to reproduce the problem
Full details here: https://askubuntu.com/questions/1063462/18-04-server-systemd-resolve-returns-cached-cname-nodata-for-a-lookup
~$ dig google.com CNAME
~$ dig google.com A
The first lookup fails (as expected). Then the second one does too.
Here are the results from the debug log:
Aug 08 11:09:04 leopard systemd-resolved[555]: Transaction 17304 for <domain.com IN CNAME> scope dns on eth0/*.
Aug 08 11:09:04 leopard systemd-resolved[555]: Using feature level UDP+EDNS0 for transaction 17304.
Aug 08 11:09:04 leopard systemd-resolved[555]: Using DNS server 8.8.8.8 for transaction 17304.
Aug 08 11:09:04 leopard systemd-resolved[555]: Sending query packet with id 17304.
Aug 08 11:09:04 leopard systemd-resolved[555]: Processing query...
Aug 08 11:09:04 leopard systemd-resolved[555]: Processing incoming packet on transaction 17304. (rcode=SUCCESS)
Aug 08 11:09:04 leopard systemd-resolved[555]: Added NODATA cache entry for google.com IN CNAME 1799s
Aug 08 11:09:04 leopard systemd-resolved[555]: Transaction 17304 for <google.com IN CNAME> on scope dns on eth0/* now complete with <success> from network (unsigned).
Aug 08 11:09:04 leopard systemd-resolved[555]: Sending response packet with id 22860 on interface 1/AF_INET.
Aug 08 11:09:04 leopard systemd-resolved[555]: Freeing transaction 17304.
Results of the A record look-up:
Aug 08 11:09:37 leopard systemd-resolved[555]: Processing query...
Aug 08 11:09:51 leopard systemd-resolved[555]: Got DNS stub UDP query packet for id 3119
Aug 08 11:09:51 leopard systemd-resolved[555]: Looking up RR for google.com IN A.
Aug 08 11:09:51 leopard systemd-resolved[555]: NODATA cache hit for google.com IN A
Aug 08 11:09:51 leopard systemd-resolved[555]: Transaction 45189 for <google.com IN A> on scope dns on eth0/* now complete with <success> from cache (unsigned).
Aug 08 11:09:51 leopard systemd-resolved[555]: Freeing transaction 45189.
Aug 08 11:09:51 leopard systemd-resolved[555]: Sending response packet with id 3119 on interface 1/AF_INET.
Activity
yuwata commentedon Aug 8, 2018
I've confirmed this on the recent snapshot.
resolve: do not hit CNAME or DNAME entry in NODATA cache
yuwata commentedon Aug 9, 2018
Fix is proposed in #9836.
resolve: do not hit CNAME or DNAME entry in NODATA cache (#9836)
resolve: do not hit CNAME or DNAME entry in NODATA cache (systemd#9836)
fransvanberckel commentedon Mar 30, 2019
Created Ubuntu Launchpad issue 1822416, please confirm ...
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1822416