From 7fd76a688479ace4d9742439efc46cbb7b1b5b16 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 19 Sep 2021 17:32:35 +0200 Subject: [PATCH] dns: Reintroduce include_empty_AAAA_if_no_ipv6 option, needed for diagnosis --- src/yunohost/dns.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/yunohost/dns.py b/src/yunohost/dns.py index 4ac62fb46..a4fcbc3fa 100644 --- a/src/yunohost/dns.py +++ b/src/yunohost/dns.py @@ -110,7 +110,7 @@ def _list_subdomains_of(parent_domain): return out -def _build_dns_conf(base_domain): +def _build_dns_conf(base_domain, include_empty_AAAA_if_no_ipv6=False): """ Internal function that will returns a data structure containing the needed information to generate/adapt the dns configuration @@ -197,9 +197,8 @@ def _build_dns_conf(base_domain): if ipv6: basic.append([basename, ttl, "AAAA", ipv6]) - # TODO - # elif include_empty_AAAA_if_no_ipv6: - # basic.append(["@", ttl, "AAAA", None]) + elif include_empty_aaaa_if_no_ipv6: + basic.append(["@", ttl, "AAAA", None]) ######### # Email # @@ -251,9 +250,8 @@ def _build_dns_conf(base_domain): if ipv6: extra.append([f"*{suffix}", ttl, "AAAA", ipv6]) - # TODO - # elif include_empty_AAAA_if_no_ipv6: - # extra.append(["*", ttl, "AAAA", None]) + elif include_empty_AAAA_if_no_ipv6: + extra.append(["*", ttl, "AAAA", None]) extra.append([basename, ttl, "CAA", '128 issue "letsencrypt.org"'])