Changeset 2201 for trunk


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

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

Location:
trunk/packages/invirt-dns
Files:
2 edited

Legend:

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

    r2197 r2201  
    11invirt-dns (0.0.10) unstable; urgency=low
    22
    3   * Add support for resolving PTR records in the in-addr.arpa zone
     3  * Add support for resolving PTR records in the in-addr.arpa zone.
     4  * If we're not authoritative for an in-addr.arpa zone, generate a
     5    phantom SOA record for the exact request that came in.
    46
    5  -- Quentin Smith <quentin@mit.edu>  Fri, 27 Feb 2009 02:39:25 -0500
     7 -- Quentin Smith <quentin@mit.edu>  Fri, 27 Feb 2009 02:56:31 -0500
    68
    79invirt-dns (0.0.9) unstable; urgency=low
  • 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.