Changeset 651 for trunk/packages/sipb-xen-dns/code
- Timestamp:
- Jun 23, 2008, 10:10:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-dns/code/dnsserver.py
r650 r651 65 65 3600, self.ns, auth=True)) 66 66 if cls == dns.IN: 67 if type in (dns.A, dns.ALL_RECORDS):68 host = name[:-len(domain)-1]69 if not host:67 host = name[:-len(domain)-1] 68 if not host: 69 if type in (dns.A, dns.ALL_RECORDS): 70 70 record = dns.Record_A('18.181.0.62', ttl) 71 71 results.append(dns.RRHeader(name, dns.A, dns.IN, 72 72 ttl, record, auth=True)) 73 else: 73 elif type == dns.NS: 74 results.append(dns.RRHeader(domain, dns.NS, dns.IN, 75 ttl, self.ns, auth=True)) 76 authority = [] 77 elif type == dns.SOA: 78 results.append(dns.RRHeader(domain, dns.SOA, dns.IN, 79 ttl, self.soa, auth=True)) 80 else: 81 if host: 74 82 value = sipb_xen_database.Machine.get_by(name=host) 75 83 if value is None or not value.nics: … … 78 86 if ip is None: #Deactivated? 79 87 return defer.fail(failure.Failure(dns.AuthoritativeDomainError(name))) 88 if type in (dns.A, dns.ALL_RECORDS): 80 89 record = dns.Record_A(ip, ttl) 81 90 results.append(dns.RRHeader(name, dns.A, dns.IN, 82 91 ttl, record, auth=True)) 83 elif type == dns.NS: 84 results.append(dns.RRHeader(domain, dns.NS, dns.IN, 85 ttl, self.ns, auth=True)) 86 authority = [] 87 elif type == dns.SOA: 88 results.append(dns.RRHeader(domain, dns.SOA, dns.IN, 89 ttl, self.soa, auth=True)) 92 elif type == dns.SOA: 93 results.append(dns.RRHeader(domain, dns.SOA, dns.IN, 94 ttl, self.soa, auth=True)) 90 95 if len(results) == 0: 91 96 authority = []
Note: See TracChangeset
for help on using the changeset viewer.