]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check check-svcb processing in nsupdate
authorMark Andrews <marka@isc.org>
Thu, 6 Oct 2022 04:23:03 +0000 (15:23 +1100)
committerMark Andrews <marka@isc.org>
Fri, 28 Oct 2022 13:22:54 +0000 (00:22 +1100)
bin/tests/system/nsupdate/tests.sh

index 10fde1ecad4bbd48754859d5821d73803046fcdd..fa3839de3e4785fb0a7740fb87379f5259c3bcb0 100755 (executable)
@@ -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