3 # Copyright (C) 2004, 2007, 2009-2014 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2000, 2001 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # Id: tests.sh,v 1.42 2011/12/16 23:01:17 each Exp
21 .
$SYSTEMTESTTOP/conf.sh
26 # wait for zone transfer to complete
34 if grep "example.nil/IN.*Transfer completed" ns
2/named.run
> /dev
/null
38 echo "I:zones are not fully loaded, waiting..."
39 tries
=`expr $tries + 1`
45 echo "I:fetching first copy of zone before update"
46 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd example.nil.\
47 @
10.53.0.1 axfr
-p 5300 > dig.out.ns1 || ret
=1
48 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
51 echo "I:fetching second copy of zone before update"
52 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd example.nil.\
53 @
10.53.0.2 axfr
-p 5300 > dig.out.ns2 || ret
=1
54 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
57 echo "I:comparing pre-update copies to known good data"
58 $PERL ..
/digcomp.pl knowngood.ns1.before
dig.out.ns1 || ret
=1
59 $PERL ..
/digcomp.pl knowngood.ns1.before
dig.out.ns2 || ret
=1
60 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
63 echo "I:updating zone"
64 # nsupdate will print a ">" prompt to stdout as it gets each input line.
65 $NSUPDATE -k ns
1/ddns.key
<<END > /dev/null || ret=1
67 update add updated.example.nil. 600 A 10.10.10.1
68 add updated.example.nil. 600 TXT Foo
72 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
74 echo "I:sleeping 5 seconds for server to incorporate changes"
78 echo "I:fetching first copy of zone after update"
79 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd example.nil.\
80 @
10.53.0.1 axfr
-p 5300 > dig.out.ns1 || ret
=1
81 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
84 echo "I:fetching second copy of zone after update"
85 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd example.nil.\
86 @
10.53.0.2 axfr
-p 5300 > dig.out.ns2 || ret
=1
87 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
90 echo "I:comparing post-update copies to known good data"
91 $PERL ..
/digcomp.pl knowngood.ns1.after
dig.out.ns1 || ret
=1
92 $PERL ..
/digcomp.pl knowngood.ns1.after
dig.out.ns2 || ret
=1
93 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
96 echo "I:testing local update policy"
97 pre
=`$DIG +short new.other.nil. @10.53.0.1 a -p 5300` || ret
=1
98 [ -z "$pre" ] || ret
=1
99 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
102 echo "I:updating zone"
103 # nsupdate will print a ">" prompt to stdout as it gets each input line.
104 $NSUPDATE -l -p 5300 -k ns
1/session.key
> /dev
/null
<<END || ret=1
106 update add new.other.nil. 600 IN A 10.10.10.1
109 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
111 echo "I:sleeping 5 seconds for server to incorporate changes"
115 echo "I:checking result of update"
116 post
=`$DIG +short new.other.nil. @10.53.0.1 a -p 5300` || ret
=1
117 [ "$post" = "10.10.10.1" ] || ret
=1
118 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
121 echo "I:comparing post-update copy to known good data"
122 $PERL ..
/digcomp.pl knowngood.ns1.after
dig.out.ns1 || ret
=1
123 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
126 echo "I:testing zone consistency checks"
127 # inserting an NS record without a corresponding A or AAAA record should fail
128 $NSUPDATE -l -p 5300 -k ns
1/session.key
> nsupdate.out
2>&1 << END && ret=1
129 update add other.nil. 600 in ns ns3.other.nil.
132 grep REFUSED nsupdate.out
> /dev
/null
2>&1 || ret
=1
133 # ...but should work if an A record is inserted first:
134 $NSUPDATE -l -p 5300 -k ns
1/session.key
> nsupdate.out
2>&1 << END || ret=1
135 update add ns4.other.nil 600 in a 10.53.0.1
137 update add other.nil. 600 in ns ns4.other.nil.
140 grep REFUSED nsupdate.out
> /dev
/null
2>&1 && ret
=1
141 # ...or if an AAAA record does:
142 $NSUPDATE -l -p 5300 -k ns
1/session.key
> nsupdate.out
2>&1 << END || ret=1
143 update add ns5.other.nil 600 in aaaa 2001:db8::1
145 update add other.nil. 600 in ns ns5.other.nil.
148 grep REFUSED nsupdate.out
> /dev
/null
2>&1 && ret
=1
149 # ...or if the NS and A/AAAA are inserted together:
150 $NSUPDATE -l -p 5300 -k ns
1/session.key
> nsupdate.out
2>&1 << END || ret=1
151 update add other.nil. 600 in ns ns6.other.nil.
152 update add ns6.other.nil 600 in a 10.53.0.1
155 grep REFUSED nsupdate.out
> /dev
/null
2>&1 && ret
=1
156 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
158 echo "I:sleeping 5 seconds for server to incorporate changes"
162 echo "I:checking result of update"
163 $DIG +short @
10.53.0.1 -p 5300 ns other.nil
> dig.out.ns1 || ret
=1
164 grep ns3.other.nil
dig.out.ns1
> /dev
/null
2>&1 && ret
=1
165 grep ns4.other.nil
dig.out.ns1
> /dev
/null
2>&1 || ret
=1
166 grep ns5.other.nil
dig.out.ns1
> /dev
/null
2>&1 || ret
=1
167 grep ns6.other.nil
dig.out.ns1
> /dev
/null
2>&1 || ret
=1
168 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
171 echo "I:check SIG(0) key is accepted"
172 key
=`$KEYGEN -q -r $RANDFILE -a NSEC3RSASHA1 -b 512 -T KEY -n ENTITY xxx`
173 echo "" |
$NSUPDATE -k ${key}.private
> /dev
/null
2>&1 || ret
=1
174 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
178 echo "I:check TYPE=0 update is rejected by nsupdate ($n)"
179 $NSUPDATE <<END > nsupdate.out 2>&1 && ret=1
180 server 10.53.0.1 5300
182 update add example.nil. in type0 ""
185 grep "unknown class/type" nsupdate.out
> /dev
/null
2>&1 || ret
=1
186 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
190 echo "I:check TYPE=0 prerequisite is handled ($n)"
191 $NSUPDATE -k ns
1/ddns.key
<<END > nsupdate.out 2>&1 || ret=1
192 server 10.53.0.1 5300
193 prereq nxrrset example.nil. type0
196 $DIG +tcp version.
bind txt ch @
10.53.0.1 -p 5300 > dig.out.ns1.
$n
197 grep "status: NOERROR" dig.out.ns1.
$n > /dev
/null || ret
=1
198 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
202 echo "I:check that TYPE=0 update is handled ($n)"
203 echo "a0e4280000010000000100000000060001c00c000000fe000000000000" |
204 $PERL ..
/packet.pl
-a 10.53.0.1 -p 5300 -t tcp
> /dev
/null
205 $DIG +tcp version.
bind txt ch @
10.53.0.1 -p 5300 > dig.out.ns1.
$n
206 grep "status: NOERROR" dig.out.ns1.
$n > /dev
/null || ret
=1
207 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
210 echo "I:check that TYPE=0 additional data is handled ($n)"
211 echo "a0e4280000010000000000010000060001c00c000000fe000000000000" |
212 $PERL ..
/packet.pl
-a 10.53.0.1 -p 5300 -t tcp
> /dev
/null
213 $DIG +tcp version.
bind txt ch @
10.53.0.1 -p 5300 > dig.out.ns1.
$n
214 grep "status: NOERROR" dig.out.ns1.
$n > /dev
/null || ret
=1
215 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
218 echo "I:check that update to undefined class is handled ($n)"
219 echo "a0e4280000010001000000000000060101c00c000000fe000000000000" |
220 $PERL ..
/packet.pl
-a 10.53.0.1 -p 5300 -t tcp
> /dev
/null
221 $DIG +tcp version.
bind txt ch @
10.53.0.1 -p 5300 > dig.out.ns1.
$n
222 grep "status: NOERROR" dig.out.ns1.
$n > /dev
/null || ret
=1
223 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
226 echo "I:check that address family mismatch is handled ($n)"
227 $NSUPDATE <<END > /dev/null 2>&1 && ret=1
230 update add 600 txt.example.nil in txt "test"
233 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
237 echo "I:check that unixtime serial number is correctly generated ($n)"
238 oldserial
=`$DIG +short unixtime.nil. soa @10.53.0.1 -p 5300 | awk '{print $3}'` || ret
=1
239 $NSUPDATE <<END > /dev/null 2>&1 || ret=1
240 server 10.53.0.1 5300
242 update add new.unixtime.nil in a 1.2.3.4
245 now
=`$PERL -e 'print time()."\n";'`
247 serial
=`$DIG +short unixtime.nil. soa @10.53.0.1 -p 5300 | awk '{print $3}'` || ret
=1
248 [ "$oldserial" -ne "$serial" ] || ret
=1
249 # allow up to 2 seconds difference between the serial
250 # number and the unix epoch date but no more
251 $PERL -e 'exit 1 if abs($ARGV[1] - $ARGV[0]) > 2;' $now $serial || ret
=1
252 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
254 if $PERL -e 'use Net::DNS;' 2>/dev
/null
256 echo "I:running update.pl test"
257 $PERL update_test.pl
-s 10.53.0.1 -p 5300 update.nil. || status
=1
259 echo "I:The second part of this test requires the Net::DNS library." >&2
263 echo "I:fetching first copy of test zone"
264 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd example.nil.\
265 @
10.53.0.1 axfr
-p 5300 > dig.out.ns1 || ret
=1
266 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
268 echo "I:fetching second copy of test zone"
269 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd example.nil.\
270 @
10.53.0.2 axfr
-p 5300 > dig.out.ns2 || ret
=1
271 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
274 echo "I:comparing zones"
275 $PERL ..
/digcomp.pl
dig.out.ns1
dig.out.ns2 || ret
=1
276 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
278 echo "I:SIGKILL and restart server ns1"
280 kill -KILL `cat named.pid`
285 $PERL $SYSTEMTESTTOP/start.pl
--noclean --restart . ns1
287 echo "I:restarted server ns1"
289 echo "I:could not restart server ns1"
295 echo "I:fetching ns1 after hard restart"
296 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd example.nil.\
297 @
10.53.0.1 axfr
-p 5300 > dig.out.ns1.after || ret
=1
298 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
301 echo "I:comparing zones"
302 $PERL ..
/digcomp.pl
dig.out.ns1
dig.out.ns1.after || ret
=1
303 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
305 echo "I:begin RT #482 regression test"
308 echo "I:update master"
309 $NSUPDATE -k ns
1/ddns.key
<<END > /dev/null || ret=1
310 server 10.53.0.1 5300
311 update add updated2.example.nil. 600 A 10.10.10.2
312 update add updated2.example.nil. 600 TXT Bar
313 update delete c.example.nil.
316 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
320 echo "I:SIGHUP slave"
321 kill -HUP `cat ns2/named.pid`
326 echo "I:update master again"
327 $NSUPDATE -k ns
1/ddns.key
<<END > /dev/null || ret=1
328 server 10.53.0.1 5300
329 update add updated3.example.nil. 600 A 10.10.10.3
330 update add updated3.example.nil. 600 TXT Zap
334 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
338 echo "I:SIGHUP slave again"
339 kill -HUP `cat ns2/named.pid`
343 echo "I:check to 'out of sync' message"
344 if grep "out of sync" ns
2/named.run
346 echo "I: failed (found 'out of sync')"
350 echo "I:end RT #482 regression test"
354 echo "I:start NSEC3PARAM changes via UPDATE on a unsigned zone test ($n)"
356 server 10.53.0.3 5300
357 update add example 3600 nsec3param 1 0 0 -
363 # the zone is not signed. The nsec3param records should be removed.
364 # this also proves that the server is still running.
365 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocmd
+norec example.\
366 @
10.53.0.3 nsec3param
-p 5300 > dig.out.ns3.
$n || ret
=1
367 grep "ANSWER: 0" dig.out.ns3.
$n > /dev
/null || ret
=1
368 grep "flags:[^;]* aa[ ;]" dig.out.ns3.
$n > /dev
/null || ret
=1
369 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
373 echo "I:change the NSEC3PARAM ttl via update ($n)"
375 server 10.53.0.3 5300
376 update add nsec3param.test 3600 NSEC3PARAM 1 0 1 -
382 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocmd
+norec nsec3param.
test.\
383 @
10.53.0.3 nsec3param
-p 5300 > dig.out.ns3.
$n || ret
=1
384 grep "ANSWER: 1" dig.out.ns3.
$n > /dev
/null || ret
=1
385 grep "3600.*NSEC3PARAM" dig.out.ns3.
$n > /dev
/null || ret
=1
386 grep "flags:[^;]* aa[ ;]" dig.out.ns3.
$n > /dev
/null || ret
=1
387 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
391 echo "I:add a new the NSEC3PARAM via update ($n)"
393 server 10.53.0.3 5300
394 update add nsec3param.test 3600 NSEC3PARAM 1 0 4 -
400 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocmd
+norec nsec3param.
test.\
401 @
10.53.0.3 nsec3param
-p 5300 > dig.out.ns3.
$n || ret
=1
402 grep "ANSWER: 2" dig.out.ns3.
$n > /dev
/null || ret
=1
403 grep "NSEC3PARAM 1 0 4 -" dig.out.ns3.
$n > /dev
/null || ret
=1
404 grep "flags:[^;]* aa[ ;]" dig.out.ns3.
$n > /dev
/null || ret
=1
405 if [ $ret != 0 ] ; then echo "I: failed"; status
=`expr $ret + $status`; fi
409 echo "I:add, delete and change the ttl of the NSEC3PARAM rrset via update ($n)"
411 server 10.53.0.3 5300
412 update delete nsec3param.test NSEC3PARAM
413 update add nsec3param.test 7200 NSEC3PARAM 1 0 5 -
419 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocmd
+norec nsec3param.
test.\
420 @
10.53.0.3 nsec3param
-p 5300 > dig.out.ns3.
$n || ret
=1
421 grep "ANSWER: 1" dig.out.ns3.
$n > /dev
/null || ret
=1
422 grep "7200.*NSEC3PARAM 1 0 5 -" dig.out.ns3.
$n > /dev
/null || ret
=1
423 grep "flags:[^;]* aa[ ;]" dig.out.ns3.
$n > /dev
/null || ret
=1
424 $JOURNALPRINT ns
3/nsec3param.
test.db.signed.jnl
> jp.out.ns3.
$n
425 # intermediate TTL changes.
426 grep "add nsec3param.test. 7200 IN NSEC3PARAM 1 0 4 -" jp.out.ns3.
$n > /dev
/null || ret
=1
427 grep "add nsec3param.test. 7200 IN NSEC3PARAM 1 0 1 -" jp.out.ns3.
$n > /dev
/null || ret
=1
428 # delayed adds and deletes.
429 grep "add nsec3param.test. 0 IN TYPE65534 .# 6 000180000500" jp.out.ns3.
$n > /dev
/null || ret
=1
430 grep "add nsec3param.test. 0 IN TYPE65534 .# 6 000140000100" jp.out.ns3.
$n > /dev
/null || ret
=1
431 grep "add nsec3param.test. 0 IN TYPE65534 .# 6 000140000400" jp.out.ns3.
$n > /dev
/null || ret
=1
432 if [ $ret != 0 ] ; then echo "I: failed"; status
=`expr $ret + $status`; fi
436 echo "I:testing that rndc stop updates the master file"
437 $NSUPDATE -k ns
1/ddns.key
<<END > /dev/null || ret=1
438 server 10.53.0.1 5300
439 update add updated4.example.nil. 600 A 10.10.10.3
442 $PERL $SYSTEMTESTTOP/stop.pl
--use-rndc . ns1
443 # Removing the journal file and restarting the server means
444 # that the data served by the new server process are exactly
445 # those dumped to the master file by "rndc stop".
447 $PERL $SYSTEMTESTTOP/start.pl
--noclean --restart . ns1
448 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd updated4.example.nil.\
449 @
10.53.0.1 a
-p 5300 > dig.out.ns1 || status
=1
450 $PERL ..
/digcomp.pl knowngood.ns1.afterstop
dig.out.ns1 || ret
=1
451 [ $ret = 0 ] ||
{ echo I
:failed
; status
=1; }
454 echo "I:check that 'nsupdate -l' with a missing keyfile reports the missing file"
455 $NSUPDATE -l -p 5300 -k ns
1/nonexistant.key
2> nsupdate.out
< /dev
/null
456 grep ns
1/nonexistant.key nsupdate.out
> /dev
/null || ret
=1
459 echo "I:failed"; status
=1
464 echo "I:check that changes to the DNSKEY RRset TTL do not have side effects ($n)"
465 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd dnskey.
test. \
466 @
10.53.0.3 -p 5300 dnskey | \
467 sed -n 's/\(.*\)10.IN/update add \1600 IN/p' |
468 (echo server
10.53.0.3 5300; cat - ; echo send
) |
471 $DIG +tcp
+noadd
+nosea
+nostat
+noquest
+nocomm
+nocmd dnskey.
test. \
472 @
10.53.0.3 -p 5300 any
> dig.out.ns3.
$n
474 grep "600.*DNSKEY" dig.out.ns3.
$n > /dev
/null || ret
=1
475 grep TYPE65534
dig.out.ns3.
$n > /dev
/null
&& ret
=1
478 echo "I:failed"; status
=1
483 echo "I:check notify with TSIG worked ($n)"
484 # if the alternate view received a notify--meaning, the notify was
485 # validly signed by "altkey"--then the zonefile update.alt.bk will
486 # will have been created.
487 [ -f ns
2/update.alt.bk
] || ret
=1
488 if [ $ret -ne 0 ]; then
495 echo "I:check type list options ($n)"
496 $NSUPDATE -T > typelist.out.T.
${n} ||
{ ret
=1; echo "I: nsupdate -T failed"; }
497 $NSUPDATE -P > typelist.out.P.
${n} ||
{ ret
=1; echo "I: nsupdate -P failed"; }
498 $NSUPDATE -TP > typelist.out.TP.
${n} ||
{ ret
=1; echo "I: nsupdate -TP failed"; }
499 grep ANY typelist.out.T.
${n} > /dev
/null
&& { ret
=1; echo "I: failed: ANY found (-T)"; }
500 grep ANY typelist.out.P.
${n} > /dev
/null
&& { ret
=1; echo "I: failed: ANY found (-P)"; }
501 grep ANY typelist.out.TP.
${n} > /dev
/null
&& { ret
=1; echo "I: failed: ANY found (-TP)"; }
502 grep KEYDATA typelist.out.T.
${n} > /dev
/null
&& { ret
=1; echo "I: failed: KEYDATA found (-T)"; }
503 grep KEYDATA typelist.out.P.
${n} > /dev
/null
&& { ret
=1; echo "I: failed: KEYDATA found (-P)"; }
504 grep KEYDATA typelist.out.TP.
${n} > /dev
/null
&& { ret
=1; echo "I: failed: KEYDATA found (-TP)"; }
505 grep AAAA typelist.out.T.
${n} > /dev
/null ||
{ ret
=1; echo "I: failed: AAAA not found (-T)"; }
506 grep AAAA typelist.out.P.
${n} > /dev
/null
&& { ret
=1; echo "I: failed: AAAA found (-P)"; }
507 grep AAAA typelist.out.TP.
${n} > /dev
/null ||
{ ret
=1; echo "I: failed: AAAA not found (-TP)"; }
508 if [ $ret -ne 0 ]; then
515 echo "I:check command list ($n)"
519 echo "$cmd" |
$NSUPDATE > /dev
/null
2>&1
520 if test $?
-gt 1 ; then
521 echo "I: failed ($cmd)"
524 echo "$cmd " |
$NSUPDATE > /dev
/null
2>&1
525 if test $?
-gt 1 ; then
526 echo "I: failed ($cmd)"
531 ) < commandlist || ret
=1
532 if [ $ret -ne 0 ]; then
538 echo "I:check TSIG key algorithms ($n)"
539 for alg
in md5 sha1 sha224 sha256 sha384 sha512
; do
540 $NSUPDATE -k ns
1/${alg}.key
<<END > /dev/null || ret=1
541 server 10.53.0.1 5300
542 update add ${alg}.keytests.nil. 600 A 10.10.10.3
547 for alg
in md5 sha1 sha224 sha256 sha384 sha512
; do
548 $DIG +short @
10.53.0.1 -p 5300 ${alg}.keytests.nil |
grep 10.10.10.3 > /dev
/null
2>&1 || ret
=1
550 if [ $ret -ne 0 ]; then
557 echo "I:check that ttl is capped by max-ttl ($n)"
558 $NSUPDATE <<END > /dev/null || ret=1
559 server 10.53.0.1 5300
560 update add cap.max-ttl.nil. 600 A 10.10.10.3
561 update add nocap.max-ttl.nil. 150 A 10.10.10.3
565 $DIG @
10.53.0.1 -p 5300 cap.max-ttl.nil |
grep "^cap.max-ttl.nil. 300" > /dev
/null
2>&1 || ret
=1
566 $DIG @
10.53.0.1 -p 5300 nocap.max-ttl.nil |
grep "^nocap.max-ttl.nil. 150" > /dev
/null
2>&1 || ret
=1
567 if [ $ret -ne 0 ]; then
574 echo "I:add a record which is truncated when logged. ($n)"
575 $NSUPDATE verylarge || ret
=1
576 $DIG +tcp @
10.53.0.1 -p 5300 txt txt.update.nil
> dig.out.ns1.
test$n
577 grep "ANSWER: 1," dig.out.ns1.
test$n > /dev
/null || ret
=1
578 grep "adding an RR at 'txt.update.nil' TXT .* \[TRUNCATED\]" ns
1/named.run
> /dev
/null || ret
=1
579 if [ $ret -ne 0 ]; then
584 echo "I:exit status: $status"