Skip to content

Cached cname NODATA returned for A lookup #9833

Closed

Description

@mattf10

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

  1. added
    bug 🐛
    on Aug 8, 2018
  2. yuwata commented on Aug 8, 2018

    @yuwata
    Member

    I've confirmed this on the recent snapshot.

  3. added a commit that references this issue on Aug 9, 2018
    66370c8
  4. yuwata commented on Aug 9, 2018

    @yuwata
    Member

    Fix is proposed in #9836.

  5. added a commit that references this issue on Aug 13, 2018
    3740146
  6. added a commit that references this issue on Oct 31, 2018
    b5d9b0d
  7. fransvanberckel commented on Mar 30, 2019

    @fransvanberckel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛resolve

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions