2000-05-17 22:38:50 +00:00
|
|
|
#!/bin/sh
|
2000-05-19 22:45:47 +00:00
|
|
|
#
|
2002-02-20 03:35:59 +00:00
|
|
|
# Copyright (C) 2000-2002 Internet Software Consortium.
|
2000-08-01 01:33:37 +00:00
|
|
|
#
|
2000-05-19 22:45:47 +00:00
|
|
|
# Permission to use, copy, modify, and distribute this software for any
|
|
|
|
# purpose with or without fee is hereby granted, provided that the above
|
|
|
|
# copyright notice and this permission notice appear in all copies.
|
2000-08-01 01:33:37 +00:00
|
|
|
#
|
2000-07-27 09:55:03 +00:00
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
|
|
|
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
|
|
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
|
|
|
# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
|
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
|
|
|
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
|
|
|
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
2002-06-17 04:01:37 +00:00
|
|
|
# $Id: tests.sh,v 1.40 2002/06/17 04:01:11 marka Exp $
|
2000-05-17 22:38:50 +00:00
|
|
|
|
2000-06-05 19:36:44 +00:00
|
|
|
SYSTEMTESTTOP=..
|
|
|
|
. $SYSTEMTESTTOP/conf.sh
|
|
|
|
|
2000-06-05 19:07:46 +00:00
|
|
|
status=0
|
2000-07-08 00:39:17 +00:00
|
|
|
n=0
|
2000-05-17 22:38:50 +00:00
|
|
|
|
2000-05-18 22:49:29 +00:00
|
|
|
rm -f dig.out.*
|
2000-05-17 22:38:50 +00:00
|
|
|
|
2002-06-17 04:01:37 +00:00
|
|
|
DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
|
2000-06-06 23:41:55 +00:00
|
|
|
|
2000-05-17 22:38:50 +00:00
|
|
|
# Check the example. domain
|
2000-07-27 23:22:35 +00:00
|
|
|
|
|
|
|
echo "I:checking that zone transfer worked ($n)"
|
2000-07-10 21:40:16 +00:00
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS a.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n || ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
n=`expr $n + 1`
|
2000-07-10 21:40:16 +00:00
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
echo "I:checking positive validation ($n)"
|
2000-07-10 21:40:16 +00:00
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth a.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
2000-07-27 23:22:35 +00:00
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
echo "I:checking negative validation ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth q.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth q.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
n=`expr $n + 1`
|
2000-07-10 21:40:16 +00:00
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
2000-05-18 22:49:29 +00:00
|
|
|
|
|
|
|
# Check the insecure.example domain
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
echo "I:checking 1-server insecurity proof ($n)"
|
2000-07-10 21:40:16 +00:00
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS a.insecure.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS a.insecure.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
|
2001-01-04 00:24:26 +00:00
|
|
|
grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - this is looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
n=`expr $n + 1`
|
2000-07-10 21:40:16 +00:00
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
2000-05-18 22:49:29 +00:00
|
|
|
|
|
|
|
# Check the secure.example domain
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
echo "I:checking multi-stage positive validation ($n)"
|
2000-07-10 21:40:16 +00:00
|
|
|
ret=0
|
2000-07-19 19:54:50 +00:00
|
|
|
$DIG $DIGOPTS +noauth a.secure.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth a.secure.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
|
2000-07-10 21:40:16 +00:00
|
|
|
$PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
|
2000-07-27 23:22:35 +00:00
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
n=`expr $n + 1`
|
2000-07-10 21:40:16 +00:00
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
2000-05-18 22:49:29 +00:00
|
|
|
|
|
|
|
# Check the bogus domain
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
echo "I:checking failed validation ($n)"
|
2000-07-10 21:40:16 +00:00
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS a.bogus.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
|
2001-02-20 18:33:50 +00:00
|
|
|
grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
n=`expr $n + 1`
|
2000-07-10 21:40:16 +00:00
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
2000-06-16 22:39:45 +00:00
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
# Try validating with a bad trusted key.
|
2000-06-21 23:06:20 +00:00
|
|
|
# This should fail.
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
echo "I:checking that validation fails with a misconfigured trusted key ($n)"
|
2000-07-10 21:40:16 +00:00
|
|
|
ret=0
|
2000-07-27 23:22:35 +00:00
|
|
|
$DIG $DIGOPTS example. soa @10.53.0.5 > dig.out.ns5.test$n || ret=1
|
2000-07-10 21:40:16 +00:00
|
|
|
grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
n=`expr $n + 1`
|
2000-07-10 21:40:16 +00:00
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
2000-07-08 00:39:17 +00:00
|
|
|
|
2001-09-19 20:47:02 +00:00
|
|
|
echo "I:checking that negative validation fails with a misconfigured trusted key ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS example. ptr @10.53.0.5 > dig.out.ns5.test$n || ret=1
|
|
|
|
grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2002-06-17 04:01:37 +00:00
|
|
|
echo "I:checking that insecurity proofs fail with a misconfigured trusted key ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS a.insecure.example. a @10.53.0.5 > dig.out.ns5.test$n || ret=1
|
|
|
|
grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2001-09-19 21:19:52 +00:00
|
|
|
echo "I:checking that validation fails when key record is missing ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS a.b.keyless.example. a @10.53.0.4 > dig.out.ns4.test$n || ret=1
|
|
|
|
grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2000-07-08 00:39:17 +00:00
|
|
|
# Check the insecure.secure.example domain (insecurity proof)
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
echo "I:checking 2-server insecurity proof ($n)"
|
2000-07-10 21:40:16 +00:00
|
|
|
ret=0
|
2000-07-27 23:22:35 +00:00
|
|
|
$DIG $DIGOPTS a.insecure.secure.example. @10.53.0.2 a \
|
|
|
|
> dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS a.insecure.secure.example. @10.53.0.4 a \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
2000-07-10 21:40:16 +00:00
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
2001-01-04 00:24:26 +00:00
|
|
|
grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - this is looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
n=`expr $n + 1`
|
2000-07-10 21:40:16 +00:00
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
2000-07-08 00:39:17 +00:00
|
|
|
|
|
|
|
# Check a negative response in insecure.secure.example
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
echo "I:checking 2-server insecurity proof with a negative answer ($n)"
|
2000-07-10 21:40:16 +00:00
|
|
|
ret=0
|
2000-07-08 00:39:17 +00:00
|
|
|
$DIG $DIGOPTS q.insecure.secure.example. @10.53.0.2 a > dig.out.ns2.test$n \
|
2000-07-10 21:40:16 +00:00
|
|
|
|| ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
$DIG $DIGOPTS q.insecure.secure.example. @10.53.0.4 a > dig.out.ns4.test$n \
|
2000-07-10 21:40:16 +00:00
|
|
|
|| ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
2001-01-04 00:24:26 +00:00
|
|
|
grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - this is looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
|
2000-07-08 00:39:17 +00:00
|
|
|
n=`expr $n + 1`
|
2000-07-10 21:40:16 +00:00
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
2000-06-21 23:06:20 +00:00
|
|
|
|
2000-07-11 00:36:44 +00:00
|
|
|
# Check that the query for a security root is successful and has ad set
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
echo "I:checking security root query ($n)"
|
2000-07-11 00:36:44 +00:00
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS . @10.53.0.4 key > dig.out.ns4.test$n || ret=1
|
|
|
|
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2000-07-27 23:22:35 +00:00
|
|
|
# Check that the setting the cd bit works
|
|
|
|
|
|
|
|
echo "I:checking cd bit on a positive answer ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth example. soa @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth +cdflag example. soa @10.53.0.5 \
|
|
|
|
> dig.out.ns5.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - this is looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
echo "I:checking cd bit on a negative answer ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS q.example. soa @10.53.0.4 > dig.out.ns4.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +cdflag q.example. soa @10.53.0.5 > dig.out.ns5.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - this is looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
echo "I:checking cd bit on a query that should fail ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS a.bogus.example. soa @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +cdflag a.bogus.example. soa @10.53.0.5 \
|
|
|
|
> dig.out.ns5.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - this is looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
echo "I:checking cd bit on an insecurity proof ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth a.insecure.example. soa @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth +cdflag a.insecure.example. soa @10.53.0.5 \
|
|
|
|
> dig.out.ns5.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1
|
2001-01-04 00:24:26 +00:00
|
|
|
grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - these are looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
|
2000-07-27 23:22:35 +00:00
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
echo "I:checking cd bit on a negative insecurity proof ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS q.insecure.example. soa @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +cdflag q.insecure.example. soa @10.53.0.5 \
|
|
|
|
> dig.out.ns5.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1
|
2001-01-04 00:24:26 +00:00
|
|
|
grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - these are looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
|
2000-07-27 23:22:35 +00:00
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2001-02-20 18:33:50 +00:00
|
|
|
echo "I:checking that validation of an ANY query works ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth foo.example. any @10.53.0.2 > dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth foo.example. any @10.53.0.4 > dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
|
|
|
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# 2 records in the zone, 1 NXT, 3 SIGs
|
|
|
|
grep "ANSWER: 6" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2001-02-21 06:47:45 +00:00
|
|
|
echo "I:checking that validation of a query returning a CNAME works ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth cname1.example. txt @10.53.0.2 \
|
|
|
|
> dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth cname1.example. txt @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
|
|
|
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# the CNAME & its sig, the TXT and its SIG
|
|
|
|
grep "ANSWER: 4" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2001-02-23 06:14:44 +00:00
|
|
|
echo "I:checking that validation of a query returning a DNAME works ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth foo.dname1.example. txt @10.53.0.2 \
|
|
|
|
> dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth foo.dname1.example. txt @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
|
|
|
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# The DNAME & its sig, the TXT and its SIG, and the synthesized CNAME.
|
|
|
|
# It would be nice to test that the CNAME is being synthesized by the
|
|
|
|
# recursive server and not cached, but I don't know how.
|
|
|
|
grep "ANSWER: 5" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2001-02-21 06:47:45 +00:00
|
|
|
echo "I:checking that validation of an ANY query returning a CNAME works ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth cname2.example. any @10.53.0.2 \
|
|
|
|
> dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth cname2.example. any @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
|
|
|
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# The CNAME, NXT, and their SIGs
|
|
|
|
grep "ANSWER: 4" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2001-02-23 06:22:11 +00:00
|
|
|
echo "I:checking that validation of an ANY query returning a DNAME works ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth foo.dname2.example. any @10.53.0.2 \
|
|
|
|
> dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth foo.dname2.example. any @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
|
|
|
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2002-02-13 01:32:12 +00:00
|
|
|
echo "I:checking that positive validation in a privately secure zone works ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth a.private.secure.example. a @10.53.0.2 \
|
|
|
|
> dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth a.private.secure.example. a @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
|
|
|
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - this is looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
echo "I:checking that negative validation in a privately secure zone works ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth q.private.secure.example. a @10.53.0.2 \
|
|
|
|
> dig.out.ns2.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth q.private.secure.example. a @10.53.0.4 \
|
|
|
|
> dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
|
|
|
|
grep "NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
|
|
|
|
# Note - this is looking for failure, hence the &&
|
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
|
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
2002-01-22 22:27:29 +00:00
|
|
|
echo "I:checking positive validation of dynamic zone ($n)"
|
|
|
|
ret=0
|
|
|
|
$DIG $DIGOPTS +noauth dynamic.example. SOA @10.53.0.3 > dig.out.ns3.test$n || ret=1
|
|
|
|
$DIG $DIGOPTS +noauth dynamic.example. SOA @10.53.0.4 > dig.out.ns4.test$n || ret=1
|
|
|
|
$PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
|
2002-02-06 03:28:59 +00:00
|
|
|
grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
|
2002-01-22 22:27:29 +00:00
|
|
|
n=`expr $n + 1`
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
# Run a minimal update test if possible. This is really just
|
|
|
|
# a regression test for RT #2399; more tests should be added.
|
|
|
|
|
|
|
|
if $PERL -e 'use Net::DNS;' 2>/dev/null
|
|
|
|
then
|
|
|
|
echo "I:running DNSSEC update test"
|
|
|
|
$PERL dnssec_update_test.pl -s 10.53.0.3 -p 5300 dynamic.example. || status=1
|
|
|
|
else
|
|
|
|
echo "I:The DNSSEC update test requires the Net::DNS library." >&2
|
|
|
|
fi
|
|
|
|
|
2000-07-07 18:25:20 +00:00
|
|
|
echo "I:exit status: $status"
|
2000-07-05 18:49:06 +00:00
|
|
|
exit $status
|