PowerDNS/pdns

CNAME need not be followed after a synthesized CNAME for a CNAME query

Opened this issue · 0 comments

  • Program: Authoritative
  • Issue Type: Bug report (minor)

Short description

As synthesized CNAME might be a perfect answer to the CNAME query(#9725 ), there is probably no need to follow the new rewritten query.

Environment

  • Operating system: Ubuntu 18
  • Software version: Authoritative Server 0.0.20224.0.master.g2dadda4fda
  • Software source: GitHub (compiled from source)

Steps to reproduce

Consider the following sample zone file:

campus.edu. 500 SOA ns1.campus.edu. root.campus.edu. 3 86400 7200 604800 300
campus.edu. 500 NS ns1.outside.edu.
c.d.campus.edu. 500 DNAME f.d.campus.edu.
foo.f.d.campus.edu. 500 CNAME done.campus.edu.
done.campus.edu. 500 A 1.1.1.1

For the query <foo.c.d.campus.edu., CNAME> the answer from the PDNS server is:

       "opcode QUERY",
          "rcode NOERROR",
          "flags QR AA",
          ";QUESTION",
          "foo.c.d.campus.edu. IN CNAME",
          ";ANSWER",
          "c.d.campus.edu. 500 IN DNAME f.d.campus.edu.",
          "foo.c.d.campus.edu. 500 IN CNAME foo.f.d.campus.edu.",
          "foo.f.d.campus.edu. 500 IN CNAME done.campus.edu.",
          ";AUTHORITY",
          "campus.edu. 500 IN NS ns1.outside.edu.",
          ";ADDITIONAL"

Expected/Actual behavior

The server can stop with the DNAME, and the synthesized CNAME records as the response to the CNAME query type. I am raising an issue as I found out that BIND and Knot don't follow, whereas PowerDNS and NSD follow and return the above answer.