From: Mark Andrews Date: Thu, 6 Oct 2022 04:23:03 +0000 (+1100) Subject: Check check-svcb processing in nsupdate X-Git-Tag: v9.19.7~26^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c040e82c82fce233d0234f6f54160f16e223b428;p=thirdparty%2Fbind9.git Check check-svcb processing in nsupdate --- diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 10fde1ecad4..fa3839de3e4 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -1199,6 +1199,33 @@ grep "bad name" nsupdate.out4-$n > /dev/null && ret=1 [ $ret = 0 ] || { echo_i "failed"; status=1; } +n=$((n + 1)) +echo_i "check check-svcb processing ($n)" +ret=0 +$NSUPDATE << EOF > nsupdate.out1-$n 2>&1 +update add _dns.ns.example 0 in svcb 1 ns.example dohpath=/{?dns} +EOF +grep "check-svcb failed: no ALPN" nsupdate.out1-$n > /dev/null || ret=1 + +$NSUPDATE << EOF > nsupdate.out2-$n 2>&1 +check-svcb off +update add _dns.ns.example 0 in svcb 1 ns.example dohpath=/{?dns} +EOF +grep "check-svcb failed: no ALPN" nsupdate.out2-$n > /dev/null && ret=1 + +$NSUPDATE << EOF > nsupdate.out3-$n 2>&1 +update add _dns.ns.example 0 in svcb 1 ns.example alpn=h2 +EOF +grep "check-svcb failed: no DOHPATH" nsupdate.out3-$n > /dev/null || ret=1 + +$NSUPDATE << EOF > nsupdate.out4-$n 2>&1 +check-svcb off +update add _dns.ns.example 0 in svcb 1 ns.example alpn=h2 +EOF +grep "check-svcb failed: no DOHPATH" nsupdate.out4-$n > /dev/null && ret=1 + +[ $ret = 0 ] || { echo_i "failed"; status=1; } + n=$((n + 1)) echo_i "check adding of delegating NS records processing ($n)" ret=0