From c040e82c82fce233d0234f6f54160f16e223b428 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 6 Oct 2022 15:23:03 +1100 Subject: [PATCH] Check check-svcb processing in nsupdate --- bin/tests/system/nsupdate/tests.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 10fde1ecad..fa3839de3e 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