Clarify conditions

This commit is contained in:
Tagadda 2022-10-11 18:06:57 +00:00 committed by Tagada
parent 029c3b7686
commit f4b396219c
3 changed files with 4 additions and 4 deletions

View file

@ -47,7 +47,7 @@ class MyDiagnoser(Diagnoser):
ipversions = []
ipv4 = Diagnoser.get_cached_report("ip", item={"test": "ipv4"}) or {}
if ipv4.get("status") == "SUCCESS" or not settings_get("dns_exposure") == "ipv6":
if ipv4.get("status") == "SUCCESS" or settings_get("dns_exposure") != "ipv6":
ipversions.append(4)
# To be discussed: we could also make this check dependent on the
@ -121,7 +121,7 @@ class MyDiagnoser(Diagnoser):
for record in dnsrecords.get("items", [])
)
if failed == 4 and not settings_get("dns_exposure") == "ipv6" or ipv6_is_important():
if failed == 4 and settings_get("dns_exposure") != "ipv6" or ipv6_is_important():
yield dict(
meta={"port": port},
data={

View file

@ -77,7 +77,7 @@ class MyDiagnoser(Diagnoser):
ipversions = []
ipv4 = Diagnoser.get_cached_report("ip", item={"test": "ipv4"}) or {}
if ipv4.get("status") == "SUCCESS" and not settings_get("dns_exposure") == "ipv6":
if ipv4.get("status") == "SUCCESS" and settings_get("dns_exposure") != "ipv6":
ipversions.append(4)
# To be discussed: we could also make this check dependent on the

View file

@ -186,7 +186,7 @@ def _build_dns_conf(base_domain, include_empty_AAAA_if_no_ipv6=False):
###########################
# Basic ipv4/ipv6 records #
###########################
if ipv4 and not settings_get("dns_exposure") == "ipv6":
if ipv4 and settings_get("dns_exposure") != "ipv6":
basic.append([basename, ttl, "A", ipv4])
if ipv6: