3 # Copyright (C) 2013, 2014 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.
18 .
$SYSTEMTESTTOP/conf.sh
20 DIGOPTS
="+tcp +nosea +nostat +noquest +nocomm +nocmd"
26 echo "I:waiting for zone transfer to complete ($n)"
28 for i
in 1 2 3 4 5 6 7 8 9
30 $DIG $DIGOPTS soa example. @
10.53.0.2 -p 5300 > dig.ns2.
test$n
31 grep SOA
dig.ns2.
test$n > /dev
/null
&& break
35 echo "I:testing case preserving responses - no acl ($n)"
37 $DIG $DIGOPTS mx example. @
10.53.0.1 -p 5300 > dig.ns1.
test$n
38 grep "0.mail.eXaMpLe" dig.ns1.
test$n > /dev
/null || ret
=1
39 grep "mAiL.example" dig.ns1.
test$n > /dev
/null || ret
=1
40 test $ret -eq 0 ||
echo "I:failed"
41 status
=`expr $status + $ret`
44 echo "I:testing no-case-compress acl '{ 10.53.0.2; }' ($n)"
47 # check that we preserve zone case for non-matching query (10.53.0.1)
48 $DIG $DIGOPTS mx example.
-b 10.53.0.1 @
10.53.0.1 -p 5300 > dig.ns1.
test$n
49 grep "0.mail.eXaMpLe" dig.ns1.
test$n > /dev
/null || ret
=1
50 grep "mAiL.example" dig.ns1.
test$n > /dev
/null || ret
=1
52 # check that we don't preserve zone case for match (10.53.0.2)
53 $DIG $DIGOPTS mx example.
-b 10.53.0.2 @
10.53.0.2 -p 5300 > dig.ns2.
test$n
54 grep "0.mail.example" dig.ns2.
test$n > /dev
/null || ret
=1
55 grep "mail.example" dig.ns2.
test$n > /dev
/null || ret
=1
57 test $ret -eq 0 ||
echo "I:failed"
58 status
=`expr $status + $ret`
60 echo "I:exit status: $status"