Debian Codegraph @

testdata/fwd_edns_bksec.tdir/fwd_edns_bksec.test

raw
1 # #-- fwd_edns_bksec.test --#
2 # source the master var file when it's there
3 [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4 # use .tpkg.var.test for in test variable passing
5 [ -f .tpkg.var.test ] && source .tpkg.var.test
6
7 PRE="../.."
8 # do the test
9 #
10 # First the nasty name.
11 # The server should not have performed EDNS fallback and cached it.
12 echo "> dig nasty.example.com."
13 dig @127.0.0.1 -p $UNBOUND_PORT nasty.example.com. | tee outfile
14
15 # no answer possible for it.
16 echo "> check backed-off"
17 if grep "10.20.30.77" outfile; then
18 echo "OK"
19 else
20 echo "> cat logfiles"
21 cat fwd.log
22 cat unbound.log
23 echo "Not OK"
24 exit 1
25 fi
26
27 # Then the www name.
28 # See if we can still get the EDNS data.
29 echo "> dig www.example.com."
30 dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
31 echo "> cat logfiles"
32 cat fwd.log
33 cat unbound.log
34 echo "> check answer"
35 if grep "10.20.30.42" outfile; then
36 echo "OK"
37 else
38 echo "Not OK"
39 exit 1
40 fi
41
42 exit 0