test whether DS chasing works correctly when forwarding

(cherry picked from commit dd8db89525)
This commit is contained in:
Evan Hunt
2020-07-10 17:57:23 -07:00
committed by Ondřej Surý
parent 22b0af0cf2
commit 544ea41224
11 changed files with 676 additions and 3 deletions

View File

@@ -19,6 +19,10 @@ sendcmd() (
"$PERL" ../send.pl 10.53.0.6 "$EXTRAPORT1"
)
rndccmd() {
"$RNDC" -c ../common/rndc.conf -p "$CONTROLPORT" -s "$@"
}
root=10.53.0.1
hidden=10.53.0.2
f1=10.53.0.3
@@ -230,6 +234,24 @@ grep "status: SERVFAIL" dig.out.$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "checking switch from forwarding to normal resolution while chasing DS ($n)"
ret=0
copy_setports ns3/named2.conf.in ns3/named.conf
rndccmd 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i
sleep 1
sendcmd << EOF
/ns1.sld.tld/A/
300 A 10.53.0.2
/sld.tld/NS/
300 NS ns1.sld.tld.
/sld.tld/
EOF
nextpart ns3/named.run >/dev/null
dig_with_opts @$f1 xxx.yyy.sld.tld ds > dig.out.$n.f1 || ret=1
grep "status: SERVFAIL" dig.out.$n.f1 > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status+ret))
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1