Opened 8 years ago

#6732 defect new

twisted.names.authority doesn't implement correct "restart" logic for cname records

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: names Keywords:
Cc: Branch:
Author:

Description

RFC 1034, Section 3.6.2 says:

CNAME RRs cause special action in DNS software.  When a name server
fails to find a desired RR in the resource set associated with the
domain name, it checks to see if the resource set consists of a CNAME
record with a matching class.  If so, the name server includes the CNAME
record in the response and restarts the query at the domain name
specified in the data field of the CNAME record.  The one exception to
this rule is that queries which match the CNAME type are not restarted.

This is not what FileAuthority does - therefore it is also not what any of the other authorities in Twisted Names does (since they all inherit FileAuthority's behavior).

FileAuthority does 'vaguely' simulate this behavior by giving CNAME records some special handling. It would probably be better just to follow the algorithm in the RFC (not that it is particularly detailed, but it gives an outline to follow at least).

This would probably fix at least one real bug with CNAME handling in Twisted Names, where only certain kinds of queries that encounter CNAMEs get good results back. It may also simplify the implementation (removing the need for special handling of additionalInformation for CNAMEs.

(Originally raised in the review of #6642)

Change History (0)

Note: See TracTickets for help on using tickets.