3 # Copyright (C) 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 # PERFORMANCE OF THIS SOFTWARE.
17 # Id: tests.sh,v 1.1.2.3 2010/06/01 06:57:31 marka Exp
20 .
$SYSTEMTESTTOP/conf.sh
27 DIGOPTS
="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
30 echo "I: checking that NSEC wildcard non-existance proof is returned auth ($n)"
32 $DIG $DIGOPTS a b.wild.nsec
+norec @
10.53.0.1 > dig.out.ns1.
test$n || ret
=1
33 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns1.
test$n > /dev
/null || ret
=1
34 if [ $ret != 0 ]; then echo "I:failed"; fi
35 status
=`expr $status + $ret`
38 echo "I: checking that NSEC wildcard non-existance proof is returned non-validating ($n)"
40 $DIG $DIGOPTS a b.wild.nsec @
10.53.0.2 > dig.out.ns2.
test$n || ret
=1
41 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns2.
test$n > /dev
/null || ret
=1
42 grep -i 'flags:.* ad[ ;]' dig.out.ns2.
test$n > /dev
/null
&& ret
=1
43 if [ $ret != 0 ]; then echo "I:failed"; fi
44 status
=`expr $status + $ret`
47 echo "I: checking that NSEC wildcard non-existance proof is returned validating ($n)"
49 $DIG $DIGOPTS a b.wild.nsec @
10.53.0.3 > dig.out.ns3.
test$n || ret
=1
50 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns3.
test$n > /dev
/null || ret
=1
51 grep -i 'flags:.* ad[ ;]' dig.out.ns3.
test$n > /dev
/null || ret
=1
52 if [ $ret != 0 ]; then echo "I:failed"; fi
53 status
=`expr $status + $ret`
56 echo "I: checking that NSEC wildcard non-existance proof is returned validating + CD ($n)"
58 $DIG $DIGOPTS +cd a b.wild.nsec @
10.53.0.5 > dig.out.ns5.
test$n || ret
=1
59 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns5.
test$n > /dev
/null || ret
=1
60 grep -i 'flags:.* ad[ ;]' dig.out.ns5.
test$n > /dev
/null
&& ret
=1
61 if [ $ret != 0 ]; then echo "I:failed"; fi
62 status
=`expr $status + $ret`
65 echo "I: checking that returned NSEC wildcard non-existance proof validates ($n)"
67 $DIG $DIGOPTS a b.wild.nsec @
10.53.0.4 > dig.out.ns4.
test$n || ret
=1
68 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns4.
test$n > /dev
/null || ret
=1
69 grep -i 'flags:.* ad[ ;]' dig.out.ns4.
test$n > /dev
/null || ret
=1
70 if [ $ret != 0 ]; then echo "I:failed"; fi
71 status
=`expr $status + $ret`
74 echo "I: checking that NSEC wildcard non-existance proof is returned private, validating ($n)"
76 $DIG $DIGOPTS a b.wild.private.nsec @
10.53.0.3 > dig.out.ns3.
test$n || ret
=1
77 grep -i 'a\.wild\.private\.nsec\..*NSEC.*private\.nsec\..*NSEC' dig.out.ns3.
test$n > /dev
/null || ret
=1
78 grep -i 'flags:.* ad[ ;]' dig.out.ns3.
test$n > /dev
/null
&& ret
=1
79 if [ $ret != 0 ]; then echo "I:failed"; fi
80 status
=`expr $status + $ret`
83 echo "I: checking that returned NSEC wildcard non-existance proof for private zone validates ($n)"
85 $DIG $DIGOPTS a b.wild.private.nsec @
10.53.0.4 > dig.out.ns4.
test$n || ret
=1
86 grep -i 'a\.wild\.private\.nsec\..*NSEC.*private\.nsec\..*NSEC' dig.out.ns4.
test$n > /dev
/null || ret
=1
87 grep -i 'flags:.* ad[ ;]' dig.out.ns4.
test$n > /dev
/null || ret
=1
88 if [ $ret != 0 ]; then echo "I:failed"; fi
89 status
=`expr $status + $ret`
92 echo "I: checking that NSEC3 wildcard non-existance proof is returned auth ($n)"
94 $DIG $DIGOPTS a b.wild.nsec3
+norec @
10.53.0.1 > dig.out.ns1.
test$n || ret
=1
95 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns1.
test$n > /dev
/null || ret
=1
96 if [ $ret != 0 ]; then echo "I:failed"; fi
97 status
=`expr $status + $ret`
100 echo "I: checking that NSEC3 wildcard non-existance proof is returned non-validating ($n)"
102 $DIG $DIGOPTS a b.wild.nsec3 @
10.53.0.2 > dig.out.ns2.
test$n || ret
=1
103 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns2.
test$n > /dev
/null || ret
=1
104 grep -i 'flags:.* ad[ ;]' dig.out.ns2.
test$n > /dev
/null
&& ret
=1
105 if [ $ret != 0 ]; then echo "I:failed"; fi
106 status
=`expr $status + $ret`
109 echo "I: checking that NSEC3 wildcard non-existance proof is returned validating ($n)"
111 $DIG $DIGOPTS a b.wild.nsec3 @
10.53.0.3 > dig.out.ns3.
test$n || ret
=1
112 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns3.
test$n > /dev
/null || ret
=1
113 grep -i 'flags:.* ad[ ;]' dig.out.ns3.
test$n > /dev
/null || ret
=1
114 if [ $ret != 0 ]; then echo "I:failed"; fi
115 status
=`expr $status + $ret`
118 echo "I: checking that NSEC3 wildcard non-existance proof is returned validating + CD ($n)"
120 $DIG $DIGOPTS +cd a b.wild.nsec3 @
10.53.0.5 > dig.out.ns5.
test$n || ret
=1
121 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns5.
test$n > /dev
/null || ret
=1
122 grep -i 'flags:.* ad[ ;]' dig.out.ns5.
test$n > /dev
/null
&& ret
=1
123 if [ $ret != 0 ]; then echo "I:failed"; fi
124 status
=`expr $status + $ret`
127 echo "I: checking that returned NSEC3 wildcard non-existance proof validates ($n)"
129 $DIG $DIGOPTS a b.wild.nsec3 @
10.53.0.4 > dig.out.ns4.
test$n || ret
=1
130 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns4.
test$n > /dev
/null || ret
=1
131 grep -i 'flags:.* ad[ ;]' dig.out.ns4.
test$n > /dev
/null || ret
=1
132 if [ $ret != 0 ]; then echo "I:failed"; fi
133 status
=`expr $status + $ret`
136 echo "I: checking that NSEC3 wildcard non-existance proof is returned private, validating ($n)"
138 $DIG $DIGOPTS a b.wild.private.nsec3 @
10.53.0.3 > dig.out.ns3.
test$n || ret
=1
139 grep -i 'UDBSP4R8OUOT6HSO39VD8B5LMOSHRD5N\.private\.nsec3\..*NSEC3.*ASDRUIB7GO00OR92S5OUGI404LT27RNU' dig.out.ns3.
test$n > /dev
/null || ret
=1
140 grep -i 'flags:.* ad[ ;]' dig.out.ns3.
test$n > /dev
/null
&& ret
=1
141 if [ $ret != 0 ]; then echo "I:failed"; fi
142 status
=`expr $status + $ret`
145 echo "I: checking that returned NSEC3 wildcard non-existance proof for private zone validates ($n)"
147 $DIG $DIGOPTS a b.wild.private.nsec3 @
10.53.0.4 > dig.out.ns4.
test$n || ret
=1
148 grep -i 'UDBSP4R8OUOT6HSO39VD8B5LMOSHRD5N\.private\.nsec3\..*NSEC3.*ASDRUIB7GO00OR92S5OUGI404LT27RNU' dig.out.ns4.
test$n > /dev
/null || ret
=1
149 grep -i 'flags:.* ad[ ;]' dig.out.ns4.
test$n > /dev
/null || ret
=1
150 if [ $ret != 0 ]; then echo "I:failed"; fi
151 status
=`expr $status + $ret`
153 echo "I:exit status: $status"