From 626f565be644107e0b1cdc7992e2579243828f3a Mon Sep 17 00:00:00 2001 From: notEvil Date: Sat, 14 Sep 2019 17:09:05 +0200 Subject: [PATCH] management/dns_update.py.get_secondary_dns: changed to additionally query IPv6 address --- management/dns_update.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/management/dns_update.py b/management/dns_update.py index dba6dbc1..66cc172e 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -875,7 +875,12 @@ def get_secondary_dns(custom_dns, mode=None): # resolve to an IP address. Otherwise just return the hostname. if not hostname.startswith("xfr:"): if mode == "xfr": + ipv6_response = dns.resolver.query(hostname+'.', "AAAA") + if len(ipv6_response) != 0: + values.append(str(ipv6_response[0])) response = dns.resolver.query(hostname+'.', "A") + if len(response) == 0: + continue hostname = str(response[0]) values.append(hostname)