bundles/powerdns: do not put private ipv4 into dns if public ipv6 exists

This commit is contained in:
Franzi 2023-09-09 22:28:52 +02:00
parent 5fda0ab464
commit 5238937044
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -143,7 +143,7 @@ def generate_dns_entries_for_nodes(metadata):
if not ip6 and not ip.is_private:
ip6 = ip
if not ip4 and found_ips['ipv4']:
if not (ip4 or ip6) and found_ips['ipv4']:
# do it again, but do not filter out private addresses
for ip in sorted(found_ips['ipv4']):
if not ip4: