TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.86k stars 401 forks source link

Behavior Difference in following CNAME rewrite #750

Closed SivaKesava1 closed 8 months ago

SivaKesava1 commented 9 months ago

Hi @ShreyasZare,

Ferret discovered a difference in behavior from Bind, NSD and Knot that is probably not a bug, but might be interesting to know.

This is using test case 320.

Zone file is:

campus.                       500 IN SOA    ns1.outside.edu. root.campus.edu. 3 604800 86400 2419200 604800
campus.                       500 IN NS     ns1.outside.edu.
*.campus.                     500 IN CNAME  example.uni.email.campus.

Response from Technitium:

          "opcode QUERY",
          "rcode NOERROR",
          "flags QR AA RA",
          ";QUESTION",
          "mybankcard.campus. IN NS",
          ";ANSWER",
          "mybankcard.campus. 500 IN CNAME example.uni.email.campus.",
          ";AUTHORITY",
          ";ADDITIONAL"

Response from Bind, Knot and NSD is:

           "opcode QUERY",
          "rcode NOERROR",
          "flags QR AA",
          ";QUESTION",
          "mybankcard.campus. IN NS",
          ";ANSWER",
          "mybankcard.campus. 500 IN CNAME example.uni.email.campus.",
          "example.uni.email.campus. 500 IN CNAME example.uni.email.campus.",
          ";AUTHORITY",
          ";ADDITIONAL"

They all use the CNAME record again to rewrite the new query, and then they notice that both the query name and the target are the same, so they stop. CNAME chains should be followed, so the expected response is to have both the records.

--Siva

ShreyasZare commented 9 months ago

Thanks for the feedback. Yes this is due to CNAME checks added which prevents another CNAME record being added if it points to same domain. Will check this implementation once again.

ShreyasZare commented 8 months ago

Thanks again for the report. Technitium DNS Server v11.5.2 is now available that fixes this issue. Do update and let me know your feedback.