Changeset 1477
- Timestamp:
- Nov 1, 2008, 12:53:20 AM (16 years ago)
- Location:
- trunk/packages/invirt-dns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-dns/debian/changelog
r1467 r1477 1 invirt-dns (0.0.5) unstable; urgency=low 2 3 * Instead of hacking in support for prod.xvm.mit.edu, support zone files 4 that override the database 5 6 -- Evan Broder <broder@mit.edu> Sat, 01 Nov 2008 00:48:53 -0400 7 1 8 invirt-dns (0.0.4) unstable; urgency=low 2 9 -
trunk/packages/invirt-dns/invirt-dns
r1464 r1477 4 4 from twisted.names import dns 5 5 from twisted.names import common 6 from twisted.names import authority 6 7 from twisted.internet import defer 7 8 from twisted.python import failure … … 57 58 ttl = 900 58 59 name = name.lower() 59 60 # XXX hack for the transition to two separate dev/prod clusters61 if 'dev.xvm.mit.edu' in self.domains and name.endswith('prod.xvm.mit.edu'):62 # import time, sys63 # print time.localtime(), 'handling prod request', name64 # sys.stdout.flush()65 66 # Point the client in the right direction for prod requests.67 authority = dns.RRHeader('prod.xvm.mit.edu', dns.NS, dns.IN, 3600,68 dns.Record_NS(name='ns1.prod.xvm.mit.edu', ttl=3600), auth=True)69 additional = dns.RRHeader('ns1.prod.xvm.mit.edu', dns.A, dns.IN, 3600,70 dns.Record_A(address='18.181.0.221', ttl=3600), auth=True)71 return defer.succeed(([], [authority], [additional]))72 60 73 61 if name in self.domains: … … 133 121 134 122 if '__main__' == __name__: 135 resolver = DatabaseAuthority() 123 resolvers = [] 124 for zone in config.dns.zone_files: 125 for origin in config.dns.domains: 126 r = authority.BindAuthority(zone) 127 # This sucks, but if I want a generic zone file, I have to 128 # reload the information by hand 129 r.origin = origin 130 lines = open(zone).readlines() 131 lines = r.collapseContinuations(r.stripComments(lines)) 132 r.parseLines(lines) 133 134 resolvers.append(r) 135 resolvers.append(DatabaseAuthority()) 136 136 137 137 verbosity = 0 138 f = server.DNSServerFactory(authorities= [resolver], verbose=verbosity)138 f = server.DNSServerFactory(authorities=resolvers, verbose=verbosity) 139 139 p = dns.DNSDatagramProtocol(f) 140 140 f.noisy = p.noisy = verbosity
Note: See TracChangeset
for help on using the changeset viewer.