Return an NS record in the authority section instead of SOA
authorEvan Broder <broder@mit.edu>
Sat, 31 May 2008 05:36:44 +0000 (01:36 -0400)
committerEvan Broder <broder@mit.edu>
Sat, 31 May 2008 05:36:44 +0000 (01:36 -0400)
svn path=/trunk/packages/sipb-xen-dns/; revision=541

code/dnsserver.py

index 3d6c296..08cf979 100755 (executable)
@@ -68,8 +68,9 @@ class DatabaseAuthority(common.ResolverBase):
                 results.append(dns.RRHeader(name, dns.A, dns.IN, 
                                             ttl, record, auth=True))
         authority = []
-        authority.append(dns.RRHeader(domain, dns.SOA, dns.IN, 3600,
-                                      self.soa, auth=True))
+        auth_record = dns.Record_NS(name='ns1.xvm.mit.edu', ttl=3600)
+        authority.append(dns.RRHeader(domain, dns.NS, dns.IN,
+                                      3600, auth_record, auth=True))
         return defer.succeed((results, authority, []))
         #Doesn't exist
         return defer.fail(failure.Failure(dns.AuthoritativeDomainError(name)))