Skip to content

Commit

Permalink
Fix ext-ip-dns check without IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
ianton-ru committed Oct 16, 2023
1 parent f13de94 commit 3502459
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ch_tools/monrun_checks/ext_ip_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ def _compare(record_type: str, ip_type: str) -> Tuple[bool, set, set]:
err.append(
f"{target.fqdn}: invalid A: expected {target_addr}, actual {actual_addr}"
)
ok, target_addr, actual_addr = _compare("AAAA", "ipv6")
if ipv6 and not ok:
err.append(
f"{target.fqdn}: invalid AAAA: expected {target_addr}, actual {actual_addr}"
)
if ipv6:
ok, target_addr, actual_addr = _compare("AAAA", "ipv6")
if not ok:
err.append(
f"{target.fqdn}: invalid AAAA: expected {target_addr}, actual {actual_addr}"
)

return err

Expand Down

0 comments on commit 3502459

Please sign in to comment.