From: Aram Sargsyan Date: Fri, 31 Oct 2025 16:34:47 +0000 (+0000) Subject: Test dig with a IPv4 source address and a IPv4+IPv6 server X-Git-Tag: v9.21.15~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e8c547e5b2410368a4e33cc082262d89a5762d0;p=thirdparty%2Fbind9.git Test dig with a IPv4 source address and a IPv4+IPv6 server Check that dig doesn't exit with an assertion failure when a IPv4 source address is defined after defining a server address which has both IPv4 and IPv6 addresses (in this case, @localhost). --- diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 4f97c62106b..27706388aa3 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -1442,6 +1442,17 @@ if [ -x "$DIG" ]; then grep -E "DS.* [0-9]+ [12] \[omitted]" dig.out.ds.test$n >/dev/null || ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) + + # See GL#5609 + n=$((n + 1)) + echo_i "check dig with a IPv4 source address and a server with both IPv4 and IPv6 addresses doesn't crash ($n)" + ret=0 + dig_with_opts @localhost example -b 10.53.0.1 >dig.out.test$n 2>&1 || ret=1 + # We only care about an assertion failure, otherwise reset 'ret' to 0, because + # @localhost is't really expected to have an answer for our query. + grep -F "core dumped" dig.out.test$n >/dev/null || ret=0 + if [ $ret -ne 0 ]; then echo_i "failed"; fi + status=$((status + ret)) else echo_i "$DIG is needed, so skipping these dig tests" fi