From 0e893626c8d9c597c567f05b71be2096054d224e Mon Sep 17 00:00:00 2001 From: sfPlayer1 Date: Fri, 18 Jul 2014 13:03:09 +0200 Subject: [PATCH] Add IPv6 glue records as well The dns_update script didn't generate IPv6 (AAAA) glue records for the name servers. This caused http://dnscheck.pingdom.com to complain about a mismatch between the glue records reported by the parent name server and mailinabox nsd. Here's the failing dnscheck output for reference: > Checking glue for ns1.my.domain.tld (1.2.3.4). > Child glue for bgwe.eu found: ns1.my.domain.tld (1.2.3.4) > Checking glue for ns1.my.domain.tld (1234::1). > Missing glue at child: ns1.my.domain.tld > Checking glue for ns2.my.domain.tld (1.2.3.4). > Child glue for bgwe.eu found: ns2.my.domain.tld (1.2.3.4) > Checking glue for ns2.my.domain.tld (1234::1). > Missing glue at child: ns2.my.domain.tld I'm not very familiar with Python and DNS, please verify ;) --- management/dns_update.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/management/dns_update.py b/management/dns_update.py index 4dd0e5d7..6f9c20a5 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -143,6 +143,9 @@ def build_zone(domain, all_domains, additional_records, env, is_zone=True): # is managed outside of the box. records.append(("ns1", "A", env["PUBLIC_IP"], False)) records.append(("ns2", "A", env["PUBLIC_IP"], False)) + if env.get('PUBLIC_IPV6'): + records.append(("ns1", "AAAA", env["PUBLIC_IPV6"])) + records.append(("ns2", "AAAA", env["PUBLIC_IPV6"])) # Set the A/AAAA records. Do this early for the PRIMARY_HOSTNAME so that the user cannot override them # and we can provide different explanatory text.