Ignore:
Timestamp:
Feb 27, 2009, 2:56:54 AM (15 years ago)
Author:
quentin
Message:

Answer all PTR requests, even if we otherwise wouldn't be authoritative

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dns/invirt-dns

    r2197 r2201  
    7171                    best_domain = domain
    7272            if best_domain == '':
    73                 return defer.fail(failure.Failure(dns.DomainError(name)))
     73                if name.endswith('.in-addr.arpa'):
     74                    best_domain = name # Act authoritative for the IP address for reverse resolution requests
     75                else:
     76                    return defer.fail(failure.Failure(dns.DomainError(name)))
    7477            domain = best_domain
    7578        results = []
     
    8184        if cls == dns.IN:
    8285            host = name[:-len(domain)-1]
    83             if not host: # Request for the domain itself.
     86            if not host and type != dns.PTR: # Request for the domain itself.
    8487                if type in (dns.A, dns.ALL_RECORDS):
    8588                    record = dns.Record_A(config.dns.nameservers[0].ip, ttl)
Note: See TracChangeset for help on using the changeset viewer.