diff --git a/zonedb.rkt b/zonedb.rkt index 0644a7b..58f5be4 100644 --- a/zonedb.rkt +++ b/zonedb.rkt @@ -179,7 +179,15 @@ ;; rr-set->list : SetOf -> ListOf ;; Like set->list, but places all CNAME records first. ;; This is apparently to work around bugs in old versions of BIND? +;; ;; TODO: Perhaps the CNAMEs even need to be in topologically-sorted order? +;; http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/dns-response-taxonomy.html +;; has this to say on this topic: +;; "A content DNS server following the algorithm in ยง 4.3.2 of RFC +;; 1034 will insert this chain in first-to-last order in the +;; response. The response parsing code in most resolving proxy DNS +;; servers and DNS client libraries expects this order. However, +;; the actual text of RFC 1034 itself does not guarantee it." (define (rr-set->list rrs) (append (set->list (filter-by-type rrs 'cname)) (set->list (set-filter (lambda (rr) (not (eqv? (rr-type rr) 'cname))) rrs))))