Changeset 2197
- Timestamp:
- Feb 27, 2009, 2:41:51 AM (16 years ago)
- Location:
- trunk/packages
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-dns/debian/changelog
r2037 r2197 1 invirt-dns (0.0.10) unstable; urgency=low 2 3 * Add support for resolving PTR records in the in-addr.arpa zone 4 5 -- Quentin Smith <quentin@mit.edu> Fri, 27 Feb 2009 02:39:25 -0500 6 1 7 invirt-dns (0.0.9) unstable; urgency=low 2 8 -
trunk/packages/invirt-dns/invirt-dns
r2037 r2197 94 94 ttl, self.soa, auth=True)) 95 95 else: # Request for a subdomain. 96 value = invirt.database.NIC.query.filter_by(hostname=host).first() 97 if value: 98 ip = value.ip 99 else: 100 value = invirt.database.Machine.query().filter_by(name=host).first() 96 if name.endswith(".in-addr.arpa"): # Reverse resolution here 97 if type in (dns.PTR, dns.ALL_RECORDS): 98 ip = '.'.join(reversed(name.split('.')[:-2])) 99 value = invirt.database.NIC.query.filter_by(ip=ip).first() 100 if value and value.hostname: 101 hostname = value.hostname 102 if '.' not in hostname: 103 hostname = hostname + "." + config.dns.domains[0] 104 record = dns.Record_PTR(hostname, ttl) 105 results.append(dns.RRHeader(name, dns.PTR, dns.IN, 106 ttl, record, auth=True)) 107 else: # IP address doesn't point to an active host 108 return defer.fail(failure.Failure(dns.AuthoritativeDomainError(name))) 109 # FIXME: Should only return success with no records if the name actually exists 110 else: # Forward resolution here 111 value = invirt.database.NIC.query.filter_by(hostname=host).first() 101 112 if value: 102 ip = value. nics[0].ip113 ip = value.ip 103 114 else: 115 value = invirt.database.Machine.query().filter_by(name=host).first() 116 if value: 117 ip = value.nics[0].ip 118 else: 119 return defer.fail(failure.Failure(dns.AuthoritativeDomainError(name))) 120 121 if ip is None: 104 122 return defer.fail(failure.Failure(dns.AuthoritativeDomainError(name))) 105 106 if ip is None: 107 return defer.fail(failure.Failure(dns.AuthoritativeDomainError(name))) 108 109 if type in (dns.A, dns.ALL_RECORDS): 110 record = dns.Record_A(ip, ttl) 111 results.append(dns.RRHeader(name, dns.A, dns.IN, 112 ttl, record, auth=True)) 113 elif type == dns.SOA: 114 results.append(dns.RRHeader(domain, dns.SOA, dns.IN, 115 ttl, self.soa, auth=True)) 123 124 if type in (dns.A, dns.ALL_RECORDS): 125 record = dns.Record_A(ip, ttl) 126 results.append(dns.RRHeader(name, dns.A, dns.IN, 127 ttl, record, auth=True)) 128 elif type == dns.SOA: 129 results.append(dns.RRHeader(domain, dns.SOA, dns.IN, 130 ttl, self.soa, auth=True)) 116 131 if len(results) == 0: 117 132 authority = [] -
trunk/packages/xvm-devconfig/debian/changelog
r2195 r2197 1 1 xvm-devconfig (0.29) unstable; urgency=low 2 2 3 * Act authoritative for 2.181.18.in-addr.arpa3 * Act authoritative for {1,2}.181.18.in-addr.arpa 4 4 5 5 -- Quentin Smith <quentin@mit.edu> Fri, 27 Feb 2009 02:20:58 -0500 -
trunk/packages/xvm-devconfig/master.yaml
r2195 r2197 37 37 - dev.xvm.mit.edu 38 38 - 2.181.18.in-addr.arpa 39 - 1.181.18.in-addr.arpa 39 40 nameservers: 40 41 - hostname: xvm-dev.mit.edu
Note: See TracChangeset
for help on using the changeset viewer.