prereq nxrrset example.nil. type0
send
END
-$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 >dig.out.ns1.$n
+$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 >dig.out.ns1.$n || ret=1
grep "status: NOERROR" dig.out.ns1.$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
echo_i "check that TYPE=0 update is handled ($n)"
echo "a0e4280000010000000100000000060001c00c000000fe000000000000" \
| $PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp >/dev/null || ret=1
-$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 >dig.out.ns1.$n
+$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 >dig.out.ns1.$n || ret=1
grep "status: NOERROR" dig.out.ns1.$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
echo_i "check that TYPE=0 additional data is handled ($n)"
echo "a0e4280000010000000000010000060001c00c000000fe000000000000" \
| $PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp >/dev/null || ret=1
-$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 >dig.out.ns1.$n
+$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 >dig.out.ns1.$n || ret=1
grep "status: NOERROR" dig.out.ns1.$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
echo_i "check that update to undefined class is handled ($n)"
echo "a0e4280000010001000000000000060101c00c000000fe000000000000" \
| $PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp >/dev/null || ret=1
-$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 >dig.out.ns1.$n
+$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 >dig.out.ns1.$n || ret=1
grep "status: NOERROR" dig.out.ns1.$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
update add foo.denyname.example 3600 IN TXT added
send
EOF
-$DIG $DIGOPTS +tcp @10.53.0.9 foo.denyname.example TXT >dig.out.ns9.test$n
+$DIG $DIGOPTS +tcp @10.53.0.9 foo.denyname.example TXT >dig.out.ns9.test$n || ret=1
grep "added" dig.out.ns9.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
update add denyname.example 3600 IN TXT added
send
EOF
-$DIG $DIGOPTS +tcp @10.53.0.9 denyname.example TXT >dig.out.ns9.test$n
+$DIG $DIGOPTS +tcp @10.53.0.9 denyname.example TXT >dig.out.ns9.test$n || ret=1
grep "added" dig.out.ns9.test$n >/dev/null && ret=1
[ $ret = 0 ] || {
echo_i "failed"
@10.53.0.3 dnskey \
| awk -v port="${PORT}" 'BEGIN { print "server 10.53.0.3", port; }
$2 == 10 && $3 == "IN" && $4 == "DNSKEY" { $2 = 600; print "update add", $0 }
- END { print "send" }' >update.in.$n
+ END { print "send" }' >update.in.$n || ret=1
$NSUPDATE update.in.$n
$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
- @10.53.0.3 any >dig.out.ns3.$n
+ @10.53.0.3 any >dig.out.ns3.$n || ret=1
grep "600.*DNSKEY" dig.out.ns3.$n >/dev/null || ret=1
grep TYPE65534 dig.out.ns3.$n >/dev/null && ret=1
ret=0
echo_i "add a record which is truncated when logged. ($n)"
$NSUPDATE verylarge || ret=1
-$DIG $DIGOPTS +tcp @10.53.0.1 txt txt.update.nil >dig.out.ns1.test$n
+$DIG $DIGOPTS +tcp @10.53.0.1 txt txt.update.nil >dig.out.ns1.test$n || ret=1
grep "ANSWER: 1," dig.out.ns1.test$n >/dev/null || ret=1
grep "adding an RR at 'txt.update.nil' TXT .* \[TRUNCATED\]" ns1/named.run >/dev/null || ret=1
if [ $ret -ne 0 ]; then
update add child.delegation.test. 3600 NS bar.example.net.
send
EOF
-$DIG $DIGOPTS +tcp @10.53.0.3 ns child.delegation.test >dig.out.ns1.test$n
+$DIG $DIGOPTS +tcp @10.53.0.3 ns child.delegation.test >dig.out.ns1.test$n || ret=1
grep "status: NOERROR" dig.out.ns1.test$n >/dev/null 2>&1 || ret=1
grep "AUTHORITY: 2" dig.out.ns1.test$n >/dev/null 2>&1 || ret=1
[ $ret = 0 ] || {
update del child.delegation.test. 3600 NS bar.example.net.
send
EOF
-$DIG $DIGOPTS +tcp @10.53.0.3 ns child.delegation.test >dig.out.ns1.test$n
+$DIG $DIGOPTS +tcp @10.53.0.3 ns child.delegation.test >dig.out.ns1.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns1.test$n >/dev/null 2>&1 || ret=1
[ $ret = 0 ] || {
echo_i "failed"
send
EOF
grep "update failed: SERVFAIL" nsupdate.out-$n >/dev/null || ret=1
-$DIG $DIGOPTS +tcp @10.53.0.3 r1.too-big.test TXT >dig.out.ns3.test$n
+$DIG $DIGOPTS +tcp @10.53.0.3 r1.too-big.test TXT >dig.out.ns3.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns3.test$n >/dev/null || ret=1
grep "records in zone (4) exceeds max-records (3)" ns3/named.run >/dev/null || ret=1
[ $ret = 0 ] || {
update add machine.example.com 3600 IN A 10.53.0.7
send
EOF
- $DIG $DIGOPTS +tcp @10.53.0.7 machine.example.com A >dig.out.ns7.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.7 machine.example.com A >dig.out.ns7.test$n || ret=1
grep "status: NOERROR" dig.out.ns7.test$n >/dev/null || ret=1
grep "machine.example.com..*A.*10.53.0.7" dig.out.ns7.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
send
EOF
grep "update failed: REFUSED" nsupdate.out-$n >/dev/null || ret=1
- $DIG $DIGOPTS +tcp @10.53.0.7 foo.example.com A >dig.out.ns7.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.7 foo.example.com A >dig.out.ns7.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns7.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
update add _xxx._tcp.example.com 3600 IN SRV 0 0 0 machine.example.com
send
EOF
- $DIG $DIGOPTS +tcp @10.53.0.7 _xxx._tcp.example.com SRV >dig.out.ns7.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.7 _xxx._tcp.example.com SRV >dig.out.ns7.test$n || ret=1
grep "status: NOERROR" dig.out.ns7.test$n >/dev/null || ret=1
grep "_xxx._tcp.example.com.*SRV.*0 0 0 machine.example.com" dig.out.ns7.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
send
EOF
grep "update failed: REFUSED" nsupdate.out-$n >/dev/null || ret=1
- $DIG $DIGOPTS +tcp @10.53.0.7 _xxx._udp.example.com SRV >dig.out.ns7.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.7 _xxx._udp.example.com SRV >dig.out.ns7.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns7.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
update add xxx.machine.example.com 3600 IN A 10.53.0.8
send
EOF
- $DIG $DIGOPTS +tcp @10.53.0.8 xxx.machine.example.com A >dig.out.ns8.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.8 xxx.machine.example.com A >dig.out.ns8.test$n || ret=1
grep "status: NOERROR" dig.out.ns8.test$n >/dev/null || ret=1
grep "xxx.machine.example.com..*A.*10.53.0.8" dig.out.ns8.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
send
EOF
grep "update failed: REFUSED" nsupdate.out-$n >/dev/null || ret=1
- $DIG $DIGOPTS +tcp @10.53.0.8 foo.example.com A >dig.out.ns8.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.8 foo.example.com A >dig.out.ns8.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns8.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
update add machine.example.com 3600 IN A 10.53.0.9
send
EOF
- $DIG $DIGOPTS +tcp @10.53.0.9 machine.example.com A >dig.out.ns9.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.9 machine.example.com A >dig.out.ns9.test$n || ret=1
grep "status: NOERROR" dig.out.ns9.test$n >/dev/null || ret=1
grep "machine.example.com..*A.*10.53.0.9" dig.out.ns9.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
send
EOF
grep "update failed: REFUSED" nsupdate.out-$n >/dev/null || ret=1
- $DIG $DIGOPTS +tcp @10.53.0.9 foo.example.com A >dig.out.ns9.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.9 foo.example.com A >dig.out.ns9.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns9.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
update add _xxx._tcp.example.com 3600 IN SRV 0 0 0 machine.example.com
send
EOF
- $DIG $DIGOPTS +tcp @10.53.0.9 _xxx._tcp.example.com SRV >dig.out.ns9.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.9 _xxx._tcp.example.com SRV >dig.out.ns9.test$n || ret=1
grep "status: NOERROR" dig.out.ns9.test$n >/dev/null || ret=1
grep "_xxx._tcp.example.com.*SRV.*0 0 0 machine.example.com" dig.out.ns9.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
send
EOF
grep "update failed: REFUSED" nsupdate.out-$n >/dev/null || ret=1
- $DIG $DIGOPTS +tcp @10.53.0.9 _xxx._udp.example.com SRV >dig.out.ns9.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.9 _xxx._udp.example.com SRV >dig.out.ns9.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns9.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"
update add xxx.machine.example.com 3600 IN A 10.53.0.10
send
EOF
- $DIG $DIGOPTS +tcp @10.53.0.10 xxx.machine.example.com A >dig.out.ns10.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.10 xxx.machine.example.com A >dig.out.ns10.test$n || ret=1
grep "status: NOERROR" dig.out.ns10.test$n >/dev/null || ret=1
grep "xxx.machine.example.com..*A.*10.53.0.10" dig.out.ns10.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
send
EOF
grep "update failed: REFUSED" nsupdate.out-$n >/dev/null || ret=1
- $DIG $DIGOPTS +tcp @10.53.0.10 foo.example.com A >dig.out.ns10.test$n
+ $DIG $DIGOPTS +tcp @10.53.0.10 foo.example.com A >dig.out.ns10.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns10.test$n >/dev/null || ret=1
[ $ret = 0 ] || {
echo_i "failed"