]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Gate the dig source-address crash check on IPv6 availability
authorMartin Basti <mbasti@isc.org>
Thu, 23 Jul 2026 09:09:54 +0000 (09:09 +0000)
committerMartin Basti <mbasti@isc.org>
Wed, 29 Jul 2026 11:58:47 +0000 (13:58 +0200)
The check for the crash with an IPv4 source address and a server with
both IPv4 and IPv6 addresses relies on @localhost resolving to ::1 as
well as 127.0.0.1: without IPv6 the address-family mismatch under test
never happens and the test passes without exercising anything.  Skip
it on hosts without IPv6 instead, like the other IPv6-dependent digdelv
tests.  The remaining unmarked tests that mention IPv6 addresses only
parse them (the IPv4-mapped server refusal) or read them as record
data, so they work without IPv6.

Assisted-by: Claude:claude-fable-5
bin/tests/system/digdelv/tests_dig.py

index 5bc130a2fcb83a4413f70015c614200a086a583d..6f5b62b329e71b24df69465c609e5ef9c984f58f 100644 (file)
@@ -990,11 +990,14 @@ def test_yaml_valid_when_no_server_reached(dig, ans7):
     assert parse_yaml(result.out)[0]["type"] == "DIG_ERROR"
 
 
+@isctest.mark.with_ipv6
 def test_source_address_both_families_no_crash(dig, ns1):
     """Check that dig with an IPv4 source address and a server with both
     IPv4 and IPv6 addresses does not crash.  @localhost is not really
     expected to have an answer for the query; only a crash (termination
-    by a signal) is an error.  See GL #5609 for more information."""
+    by a signal) is an error.  Without IPv6, @localhost resolves to the
+    IPv4 address only and the address-family mismatch under test never
+    happens.  See GL #5609 for more information."""
     result = dig(f"@localhost example -b {ns1.ip}", raise_on_exception=False)
     assert result.rc >= 0