Hi
The function zone_for_name blindly returns the domain name if a SOA
lookup on it succeeds eventhough that lookup may return the SOA record
for the actual zone. This seems to atleast occur when domain name is
CNAME'd to its parent.
For example the domain www.bhc-zagreb.hr is CNAME'd to bhc-zagreb.hr
which is also the zone. Dig gives us:
$dig soa www.bhc-zagreb.hr
; <<>> DiG 9.7.0-P1 <<>> soa www.bhc-zagreb.hr
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55218
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; QUESTION SECTION:
;www.bhc-zagreb.hr. IN SOA
;; ANSWER SECTION:
www.bhc-zagreb.hr. 3507 IN CNAME bhc-zagreb.hr.
bhc-zagreb.hr. 3475 IN SOA dns.carnet.hr.
hostmaster.carnet.hr. 2009032101 10800 3600 2419200 14400
;; ADDITIONAL SECTION:
dns.carnet.hr. 14302 IN A 161.53.123.2
;; Query time: 22 msec
;; SERVER: 196.31.150.81#53(196.31.150.81)
;; WHEN: Tue Jul 27 12:26:45 2010
;; MSG SIZE rcvd: 123
But zone_for_name gives:
In [56]: dns.resolver.zone_for_name('www.bhc-zagreb.hr')
Out[56]: <DNS name www.bhc-zagreb.hr.>
Which seems incorrect.
Notably the answer from the query that zone_for_name performs does
contain the actual SOA record from which the correct zone can be determined.
Another example domain is: www.0rz.tw
--
Regards
Gert Burger
_______________________________________________
dnspython-bugs mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-bugs