Changes between and of Initial VersionVersion 3Ticket #2850


Ignore:
Timestamp:
10/15/2007 01:16:32 PM (10 years ago)
Author:
Jean-Paul Calderone
Comment:

fixing markup in description

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2850

    • Property Milestone changed from Names-0.4 to
  • Ticket #2850 – Description

    initial v3  
    66When we got a resolver and call getHostByname, perhaps DNS server can return CNAME,  Auth NS Server Name and Auth NS Server IP Address. So extractRecord function will extract the Auth NS Server and send the DNS request to the Auth NS Server. But there is a bug in the extractRecord function.
    77
    8 Code:
     8{{{
    99    # No answers, but maybe there's a hint at who we should be asking about this
    1010    for r in answers:
     
    1313            r = client.Resolver(servers=[(str(r.payload.name), dns.PORT)])
    1414            return r.lookupAddress(str(name)
     15}}}
    1516
    1617Generally, the Auth NS Server is the Domain name, and it's IP contained in the addition fields. If we get the NS Server by r.payload.name, we will get the DNS Server Domain, so  the Domain as server will pass to  client.queryUDP as DNS Server Address.  UDP.write will complaint that  warnings.warn("Please only pass IPs to write(), not hostnames "+addr[0], DeprecationWarning, stacklevel=2). In addition, self.socket.sendto(datagram, addr) will call socket.gethostbyname(addr), but this call is block.
     
    1920I think we should use the Auth NS Server IP to replace the Domain.
    2021The patch code as fellow:
     22
     23{{{
    2124    # No answers, but maybe there's a hint at who we should be asking about this
    2225    for r in answers:
     
    3134
    3235            r = client.Resolver(servers=[(server, dns.PORT)])
    33 
     36}}}