fix resolving to not add the service server's domain, but just "."

This commit is contained in:
Thomas Waldmann 2014-11-27 20:03:34 +01:00
parent 6261b64b72
commit 0db2e60263

View File

@ -215,7 +215,9 @@ def query_ns(fqdn, rdtype):
if nameserver2: if nameserver2:
# if we have a secondary ns, prefer it for queries # if we have a secondary ns, prefer it for queries
resolver.nameservers.insert(0, nameserver2) resolver.nameservers.insert(0, nameserver2)
resolver.search = [] # we must put the root zone into the search list, so that if a fqdn without "."
# at the end comes in, it will append "." (and not the service server's domain).
resolver.search = [dns.name.root, ]
resolver.lifetime = RESOLVER_TIMEOUT resolver.lifetime = RESOLVER_TIMEOUT
# as we query directly the (authoritative) master dns, we do not desire # as we query directly the (authoritative) master dns, we do not desire
# recursion. But: RD (recursion desired) is the internal default for flags # recursion. But: RD (recursion desired) is the internal default for flags