3 # Copyright (C) 2014, 2015 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.
20 .
$SYSTEMTESTTOP/conf.sh
26 echo "I:checking drop edns server setup ($n)"
28 $DIG +edns @
10.53.0.2 -p 5300 dropedns soa
> dig.out
.1.
test$n
29 grep "connection timed out; no servers could be reached" dig.out
.1.
test$n > /dev
/null || ret
=1
30 $DIG +noedns @
10.53.0.2 -p 5300 dropedns soa
> dig.out
.2.
test$n || ret
=1
31 grep "status: NOERROR" dig.out
.2.
test$n > /dev
/null || ret
=1
32 grep "EDNS: version:" dig.out
.2.
test$n > /dev
/null
&& ret
=1
33 $DIG +noedns
+tcp @
10.53.0.2 -p 5300 dropedns soa
> dig.out
.3.
test$n || ret
=1
34 grep "status: NOERROR" dig.out
.3.
test$n > /dev
/null || ret
=1
35 grep "EDNS: version:" dig.out
.3.
test$n > /dev
/null
&& ret
=1
36 $DIG +edns
+tcp @
10.53.0.2 -p 5300 dropedns soa
> dig.out
.4.
test$n
37 grep "connection timed out; no servers could be reached" dig.out
.4.
test$n > /dev
/null || ret
=1
38 if [ $ret != 0 ]; then echo "I:failed"; fi
39 status
=`expr $status + $ret`
42 echo "I:checking recursive lookup to drop edns server succeeds ($n)"
44 $DIG +tcp @
10.53.0.1 -p 5300 dropedns soa
> dig.out.
test$n || ret
=1
45 grep "status: NOERROR" dig.out.
test$n > /dev
/null || ret
=1
46 if [ $ret != 0 ]; then echo "I:failed"; fi
47 status
=`expr $status + $ret`
50 echo "I:checking drop edns + no tcp server setup ($n)"
52 $DIG +edns @
10.53.0.3 -p 5300 dropedns-notcp soa
> dig.out
.1.
test$n
53 grep "connection timed out; no servers could be reached" dig.out
.1.
test$n > /dev
/null || ret
=1
54 $DIG +noedns
+tcp @
10.53.0.3 -p 5300 dropedns-notcp soa
> dig.out
.2.
test$n
55 grep "connection timed out; no servers could be reached" dig.out
.2.
test$n > /dev
/null
56 $DIG +noedns @
10.53.0.3 -p 5300 dropedns-notcp soa
> dig.out
.3.
test$n || ret
=1
57 grep "status: NOERROR" dig.out
.3.
test$n > /dev
/null || ret
=1
58 grep "EDNS: version:" dig.out
.3.
test$n > /dev
/null
&& ret
=1
59 if [ $ret != 0 ]; then echo "I:failed"; fi
60 status
=`expr $status + $ret`
63 echo "I:checking recursive lookup to drop edns + no tcp server succeeds ($n)"
65 $DIG +tcp @
10.53.0.1 -p 5300 dropedns-notcp soa
> dig.out.
test$n || ret
=1
66 grep "status: NOERROR" dig.out.
test$n > /dev
/null || ret
=1
67 if [ $ret != 0 ]; then echo "I:failed"; fi
68 status
=`expr $status + $ret`
71 echo "I:checking plain dns server setup ($n)"
73 $DIG +edns @
10.53.0.4 -p 5300 plain soa
> dig.out
.1.
test$n || ret
=1
74 grep "status: NOERROR" dig.out
.1.
test$n > /dev
/null || ret
=1
75 grep "EDNS: version:" dig.out
.1.
test$n > /dev
/null
&& ret
=1
76 if [ $ret != 0 ]; then echo "I:failed"; fi
77 status
=`expr $status + $ret`
80 echo "I:checking recursive lookup to plain dns server succeeds ($n)"
82 $DIG +tcp @
10.53.0.1 -p 5300 plain soa
> dig.out.
test$n || ret
=1
83 grep "status: NOERROR" dig.out.
test$n > /dev
/null || ret
=1
84 if [ $ret != 0 ]; then echo "I:failed"; fi
85 status
=`expr $status + $ret`
88 echo "I:checking plain dns + no tcp server setup ($n)"
90 $DIG +edns @
10.53.0.5 -p 5300 plain-notcp soa
> dig.out
.1.
test$n || ret
=1
91 grep "status: NOERROR" dig.out
.1.
test$n > /dev
/null || ret
=1
92 grep "EDNS: version:" dig.out
.1.
test$n > /dev
/null
&& ret
=1
93 $DIG +edns
+tcp @
10.53.0.5 -p 5300 plain-notcp soa
> dig.out
.2.
test$n
94 grep "connection timed out; no servers could be reached" dig.out
.2.
test$n > /dev
/null
95 if [ $ret != 0 ]; then echo "I:failed"; fi
96 status
=`expr $status + $ret`
99 echo "I:checking recursive lookup to plain dns + no tcp server succeeds ($n)"
101 $DIG +tcp @
10.53.0.1 -p 5300 plain-notcp soa
> dig.out.
test$n || ret
=1
102 grep "status: NOERROR" dig.out.
test$n > /dev
/null || ret
=1
103 if [ $ret != 0 ]; then echo "I:failed"; fi
104 status
=`expr $status + $ret`
107 echo "I:checking edns 512 server setup ($n)"
109 $DIG +edns @
10.53.0.6 -p 5300 edns512 soa
> dig.out
.1.
test$n || ret
=1
110 grep "status: NOERROR" dig.out
.1.
test$n > /dev
/null || ret
=1
111 $DIG +edns
+tcp @
10.53.0.6 -p 5300 edns512 soa
> dig.out
.2.
test$n || ret
=1
112 grep "status: NOERROR" dig.out
.1.
test$n > /dev
/null || ret
=1
113 $DIG +edns @
10.53.0.6 -p 5300 txt500.edns512 txt
> dig.out
.3.
test$n
114 grep "connection timed out; no servers could be reached" dig.out
.3.
test$n > /dev
/null
115 $DIG +edns
+bufsize
=512 +ignor @
10.53.0.6 -p 5300 txt500.edns512 txt
> dig.out
.4.
test$n
116 grep "status: NOERROR" dig.out
.4.
test$n > /dev
/null || ret
=1
117 if [ $ret != 0 ]; then echo "I:failed"; fi
118 status
=`expr $status + $ret`
121 echo "I:checking recursive lookup to edns 512 server succeeds ($n)"
123 $DIG +tcp @
10.53.0.1 -p 5300 txt500.edns512 txt
> dig.out.
test$n || ret
=1
124 grep "status: NOERROR" dig.out.
test$n > /dev
/null || ret
=1
125 if [ $ret != 0 ]; then echo "I:failed"; fi
126 status
=`expr $status + $ret`
129 echo "I:checking edns 512 + no tcp server setup ($n)"
131 $DIG +noedns @
10.53.0.7 -p 5300 edns512-notcp soa
> dig.out
.1.
test$n || ret
=1
132 grep "status: NOERROR" dig.out
.1.
test$n > /dev
/null || ret
=1
133 $DIG +noedns
+tcp @
10.53.0.7 -p 5300 edns512-notcp soa
> dig.out
.2.
test$n
134 grep "connection timed out; no servers could be reached" dig.out
.2.
test$n > /dev
/null
135 $DIG +edns @
10.53.0.7 -p 5300 edns512-notcp soa
> dig.out
.3.
test$n
136 grep "connection timed out; no servers could be reached" dig.out
.3.
test$n > /dev
/null
137 $DIG +edns
+bufsize
=512 +ignor @
10.53.0.7 -p 5300 edns512-notcp soa
> dig.out
.4.
test$n
138 grep "status: NOERROR" dig.out
.4.
test$n > /dev
/null || ret
=1
139 if [ $ret != 0 ]; then echo "I:failed"; fi
140 status
=`expr $status + $ret`
143 echo "I:checking recursive lookup to edns 512 + no tcp server succeeds ($n)"
145 $DIG +tcp @
10.53.0.1 -p 5300 edns512-notcp soa
> dig.out.
test$n || ret
=1
146 grep "status: NOERROR" dig.out.
test$n > /dev
/null || ret
=1
147 if [ $ret != 0 ]; then echo "I:failed"; fi
148 status
=`expr $status + $ret`
150 if $SHELL ..
/testcrypto.sh
> /dev
/null
2>&1
152 $PERL $SYSTEMTESTTOP/stop.pl . ns1
154 cp -f ns
1/named2.conf ns
1/named.conf
156 $PERL $SYSTEMTESTTOP/start.pl
--noclean --restart . ns1
159 echo "I:checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)"
161 $DIG +tcp @
10.53.0.1 -p 5300 edns512-notcp soa
> dig.out.
test$n
162 grep "status: SERVFAIL" dig.out.
test$n > /dev
/null ||
163 grep "connection timed out;" dig.out.
test$n > /dev
/null || ret
=1
164 if [ $ret != 0 ]; then echo "I:failed"; fi
165 status
=`expr $status + $ret`
167 echo "I:skipping checking recursive lookup to edns 512 + no tcp + trust anchor fails as crypto not enabled"
171 echo "I:exit status: $status"