Commit 1cc9c133 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Added subdomain delegation

parent 2468a959
......@@ -127,6 +127,15 @@ def header(tree, domain, origin=None):
util.fqn(tree, ns._parent))
delegation = []
for ns in tree._host_._interface_._nameserver_:
subdomain = ns.domain[0].split('.')
if subdomain[1:] == domain.split('.'):
delegation.append( '%-16sIN NS %s' %
(subdomain[0], util.fqn(tree, ns._parent)))
for d in sorted(delegation):
result += d
result += ";"
return result
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment