From dcc6bde0a3c6580514675c59f8ffa499cee8f7c5 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 24 Aug 2000 22:23:46 +0000 Subject: [PATCH] Added a system test for selective forwarding. --- bin/tests/system/conf.sh.in | 6 +- bin/tests/system/forward/clean.sh | 21 ++++++ bin/tests/system/forward/ns1/example.db | 12 ++++ bin/tests/system/forward/ns1/named.conf | 53 +++++++++++++++ bin/tests/system/forward/ns1/root.db | 36 ++++++++++ bin/tests/system/forward/ns2/example.db | 12 ++++ bin/tests/system/forward/ns2/named.conf | 48 ++++++++++++++ bin/tests/system/forward/ns2/root.db | 36 ++++++++++ bin/tests/system/forward/ns3/named.conf | 46 +++++++++++++ bin/tests/system/forward/ns3/root.db | 36 ++++++++++ bin/tests/system/forward/ns4/named.conf | 49 ++++++++++++++ bin/tests/system/forward/ns4/root.db | 36 ++++++++++ bin/tests/system/forward/tests.sh | 88 +++++++++++++++++++++++++ util/copyrights | 12 ++++ 14 files changed, 488 insertions(+), 3 deletions(-) create mode 100644 bin/tests/system/forward/clean.sh create mode 100644 bin/tests/system/forward/ns1/example.db create mode 100644 bin/tests/system/forward/ns1/named.conf create mode 100644 bin/tests/system/forward/ns1/root.db create mode 100644 bin/tests/system/forward/ns2/example.db create mode 100644 bin/tests/system/forward/ns2/named.conf create mode 100644 bin/tests/system/forward/ns2/root.db create mode 100644 bin/tests/system/forward/ns3/named.conf create mode 100644 bin/tests/system/forward/ns3/root.db create mode 100644 bin/tests/system/forward/ns4/named.conf create mode 100644 bin/tests/system/forward/ns4/root.db create mode 100644 bin/tests/system/forward/tests.sh diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 98a90da064..0c5a7ba210 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: conf.sh.in,v 1.12 2000/08/01 01:14:21 tale Exp $ +# $Id: conf.sh.in,v 1.13 2000/08/24 22:23:43 bwelling Exp $ # # Common configuration data for system tests, to be sourced into @@ -37,8 +37,8 @@ KEYGEN=$TOP/bin/dnssec/dnssec-keygen SIGNER=$TOP/bin/dnssec/dnssec-signzone KEYSIGNER=$TOP/bin/dnssec/dnssec-signkey KEYSETTOOL=$TOP/bin/dnssec/dnssec-makekeyset -SUBDIRS="dnssec glue limits lwresd notify nsupdate resolver stub views xfer \ - xferquota" +SUBDIRS="dnssec forward glue limits lwresd notify nsupdate resolver stub \ + views xfer xferquota" # PERL will be an empty string if no perl interpreter was found. PERL=@PERL@ diff --git a/bin/tests/system/forward/clean.sh b/bin/tests/system/forward/clean.sh new file mode 100644 index 0000000000..dfca01e782 --- /dev/null +++ b/bin/tests/system/forward/clean.sh @@ -0,0 +1,21 @@ +# Copyright (C) 2000 Internet Software Consortium. +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +# $Id: clean.sh,v 1.1 2000/08/24 22:23:44 bwelling Exp $ + +# +# Clean up after forward tests. +# +rm -f dig.out.* diff --git a/bin/tests/system/forward/ns1/example.db b/bin/tests/system/forward/ns1/example.db new file mode 100644 index 0000000000..ebbc2aedc1 --- /dev/null +++ b/bin/tests/system/forward/ns1/example.db @@ -0,0 +1,12 @@ +$TTL 300 ; 5 minutes +@ IN SOA ns root ( + 2000082401 ; serial + 1800 ; refresh (30 minutes) + 1800 ; retry (30 minutes) + 1814400 ; expire (3 weeks) + 3600 ; minimum (1 hour) + ) + NS ns +ns A 10.53.0.1 + +txt TXT "recursed" diff --git a/bin/tests/system/forward/ns1/named.conf b/bin/tests/system/forward/ns1/named.conf new file mode 100644 index 0000000000..0119c73cfc --- /dev/null +++ b/bin/tests/system/forward/ns1/named.conf @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2000 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: named.conf,v 1.1 2000/08/24 22:23:44 bwelling Exp $ */ + +options { + query-source address 10.53.0.1; + port 5300; + directory "."; + pid-file "named.pid"; + listen-on { 10.53.0.1; }; + listen-on-v6 {none;}; + recursion no; +}; + +zone "." { + type master; + file "root.db"; +}; + +zone "example1." { + type master; + file "example.db"; +}; + +zone "example2." { + type master; + file "example.db"; +}; + +zone "example3." { + type master; + file "example.db"; +}; + +zone "example4." { + type master; + file "example.db"; +}; diff --git a/bin/tests/system/forward/ns1/root.db b/bin/tests/system/forward/ns1/root.db new file mode 100644 index 0000000000..07b6a79107 --- /dev/null +++ b/bin/tests/system/forward/ns1/root.db @@ -0,0 +1,36 @@ +; Copyright (C) 2000 Internet Software Consortium. +; +; Permission to use, copy, modify, and distribute this software for any +; purpose with or without fee is hereby granted, provided that the above +; copyright notice and this permission notice appear in all copies. +; +; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +; $Id: root.db,v 1.1 2000/08/24 22:23:45 bwelling Exp $ + +$TTL 300 +. IN SOA gson.nominum.com. a.root.servers.nil. ( + 2000042100 ; serial + 600 ; refresh + 600 ; retry + 1200 ; expire + 600 ; minimum + ) +. NS a.root-servers.nil. +a.root-servers.nil. A 10.53.0.1 + +example1 NS ns.example1 +ns.example1 A 10.53.0.1 + +example2 NS ns.example2 +ns.example2 A 10.53.0.1 + +example3 NS ns.example3 +ns.example3 A 10.53.0.1 diff --git a/bin/tests/system/forward/ns2/example.db b/bin/tests/system/forward/ns2/example.db new file mode 100644 index 0000000000..3a5f46c19e --- /dev/null +++ b/bin/tests/system/forward/ns2/example.db @@ -0,0 +1,12 @@ +$TTL 300 ; 5 minutes +@ IN SOA ns root ( + 2000082401 ; serial + 1800 ; refresh (30 minutes) + 1800 ; retry (30 minutes) + 1814400 ; expire (3 weeks) + 3600 ; minimum (1 hour) + ) + NS ns +ns A 10.53.0.1 + +txt TXT "forwarded" diff --git a/bin/tests/system/forward/ns2/named.conf b/bin/tests/system/forward/ns2/named.conf new file mode 100644 index 0000000000..ce3bb92d42 --- /dev/null +++ b/bin/tests/system/forward/ns2/named.conf @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2000 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: named.conf,v 1.1 2000/08/24 22:23:45 bwelling Exp $ */ + +options { + query-source address 10.53.0.2; + port 5300; + directory "."; + pid-file "named.pid"; + listen-on { 10.53.0.2; }; + listen-on-v6 {none;}; + recursion no; +}; + +zone "." { + type hint; + file "root.db"; +}; + +zone "example1." { + type master; + file "example.db"; +}; + +zone "example2." { + type master; + file "example.db"; +}; + +zone "example3." { + type master; + file "example.db"; +}; diff --git a/bin/tests/system/forward/ns2/root.db b/bin/tests/system/forward/ns2/root.db new file mode 100644 index 0000000000..07b6a79107 --- /dev/null +++ b/bin/tests/system/forward/ns2/root.db @@ -0,0 +1,36 @@ +; Copyright (C) 2000 Internet Software Consortium. +; +; Permission to use, copy, modify, and distribute this software for any +; purpose with or without fee is hereby granted, provided that the above +; copyright notice and this permission notice appear in all copies. +; +; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +; $Id: root.db,v 1.1 2000/08/24 22:23:45 bwelling Exp $ + +$TTL 300 +. IN SOA gson.nominum.com. a.root.servers.nil. ( + 2000042100 ; serial + 600 ; refresh + 600 ; retry + 1200 ; expire + 600 ; minimum + ) +. NS a.root-servers.nil. +a.root-servers.nil. A 10.53.0.1 + +example1 NS ns.example1 +ns.example1 A 10.53.0.1 + +example2 NS ns.example2 +ns.example2 A 10.53.0.1 + +example3 NS ns.example3 +ns.example3 A 10.53.0.1 diff --git a/bin/tests/system/forward/ns3/named.conf b/bin/tests/system/forward/ns3/named.conf new file mode 100644 index 0000000000..68a0231bb6 --- /dev/null +++ b/bin/tests/system/forward/ns3/named.conf @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2000 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: named.conf,v 1.1 2000/08/24 22:23:46 bwelling Exp $ */ + +options { + query-source address 10.53.0.3; + port 5300; + directory "."; + pid-file "named.pid"; + listen-on { 10.53.0.3; }; + listen-on-v6 {none;}; + forwarders { 10.53.0.2; }; + forward first; +}; + +zone "." { + type hint; + file "root.db"; +}; + +zone "example1." { + type forward; + forward first; + forwarders { 10.53.0.2; }; +}; + +zone "example2." { + type forward; + forward first; +}; + diff --git a/bin/tests/system/forward/ns3/root.db b/bin/tests/system/forward/ns3/root.db new file mode 100644 index 0000000000..6d4fb6a731 --- /dev/null +++ b/bin/tests/system/forward/ns3/root.db @@ -0,0 +1,36 @@ +; Copyright (C) 2000 Internet Software Consortium. +; +; Permission to use, copy, modify, and distribute this software for any +; purpose with or without fee is hereby granted, provided that the above +; copyright notice and this permission notice appear in all copies. +; +; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +; $Id: root.db,v 1.1 2000/08/24 22:23:46 bwelling Exp $ + +$TTL 300 +. IN SOA gson.nominum.com. a.root.servers.nil. ( + 2000042100 ; serial + 600 ; refresh + 600 ; retry + 1200 ; expire + 600 ; minimum + ) +. NS a.root-servers.nil. +a.root-servers.nil. A 10.53.0.1 + +example1 NS ns.example1 +ns.example1 A 10.53.0.1 + +example2 NS ns.example2 +ns.example2 A 10.53.0.1 + +example3 NS ns.example3 +ns.example3 A 10.53.0.1 diff --git a/bin/tests/system/forward/ns4/named.conf b/bin/tests/system/forward/ns4/named.conf new file mode 100644 index 0000000000..cb0f5d9a6d --- /dev/null +++ b/bin/tests/system/forward/ns4/named.conf @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2000 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: named.conf,v 1.1 2000/08/24 22:23:46 bwelling Exp $ */ + +options { + query-source address 10.53.0.4; + port 5300; + directory "."; + pid-file "named.pid"; + listen-on { 10.53.0.4; }; + listen-on-v6 {none;}; +}; + +zone "." { + type hint; + file "root.db"; +}; + +zone "example1." { + type forward; + forward first; + forwarders { 10.53.0.2; }; +}; + +zone "example3." { + type forward; + forwarders { 10.53.0.2; }; +}; + +zone "example4." { + type forward; + forward only; + forwarders { 10.53.0.2; }; +}; diff --git a/bin/tests/system/forward/ns4/root.db b/bin/tests/system/forward/ns4/root.db new file mode 100644 index 0000000000..6d4fb6a731 --- /dev/null +++ b/bin/tests/system/forward/ns4/root.db @@ -0,0 +1,36 @@ +; Copyright (C) 2000 Internet Software Consortium. +; +; Permission to use, copy, modify, and distribute this software for any +; purpose with or without fee is hereby granted, provided that the above +; copyright notice and this permission notice appear in all copies. +; +; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +; $Id: root.db,v 1.1 2000/08/24 22:23:46 bwelling Exp $ + +$TTL 300 +. IN SOA gson.nominum.com. a.root.servers.nil. ( + 2000042100 ; serial + 600 ; refresh + 600 ; retry + 1200 ; expire + 600 ; minimum + ) +. NS a.root-servers.nil. +a.root-servers.nil. A 10.53.0.1 + +example1 NS ns.example1 +ns.example1 A 10.53.0.1 + +example2 NS ns.example2 +ns.example2 A 10.53.0.1 + +example3 NS ns.example3 +ns.example3 A 10.53.0.1 diff --git a/bin/tests/system/forward/tests.sh b/bin/tests/system/forward/tests.sh new file mode 100644 index 0000000000..5e3108ea15 --- /dev/null +++ b/bin/tests/system/forward/tests.sh @@ -0,0 +1,88 @@ +# Copyright (C) 2000 Internet Software Consortium. +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +# $Id: tests.sh,v 1.1 2000/08/24 22:23:44 bwelling Exp $ + +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + +# +# Perform tests +# + +root=10.53.0.1 +hidden=10.53.0.2 +f1=10.53.0.3 +f2=10.53.0.4 + +status=0 + +echo "I:checking that a forward zone overrides global forwarders" +ret=0 +$DIG txt.example1. txt @$hidden -p 5300 > dig.out.hidden || ret=1 +$DIG txt.example1. txt @$f1 -p 5300 > dig.out.f1 || ret=1 +$PERL ../digcomp.pl dig.out.hidden dig.out.f1 || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:checking that a forward zone with an empty forwarder list fails" +ret=0 +$DIG txt.example2. txt @$root -p 5300 > dig.out.root || ret=1 +$DIG txt.example2. txt @$f1 -p 5300 > dig.out.f1 || ret=1 +$PERL ../digcomp.pl dig.out.root dig.out.f1 || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:checking that global forwarders work" +ret=0 +$DIG txt.example3. txt @$hidden -p 5300 > dig.out.hidden || ret=1 +$DIG txt.example3. txt @$f1 -p 5300 > dig.out.f1 || ret=1 +$PERL ../digcomp.pl dig.out.hidden dig.out.f1 || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:checking that a forward zone works" +ret=0 +$DIG txt.example1. txt @$hidden -p 5300 > dig.out.hidden || ret=1 +$DIG txt.example1. txt @$f2 -p 5300 > dig.out.f2 || ret=1 +$PERL ../digcomp.pl dig.out.hidden dig.out.f2 || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:checking that forwarding doesn't spontaneously happen" +ret=0 +$DIG txt.example2. txt @$root -p 5300 > dig.out.root || ret=1 +$DIG txt.example2. txt @$f2 -p 5300 > dig.out.f2 || ret=1 +$PERL ../digcomp.pl dig.out.root dig.out.f2 || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:checking that a forward zone with no specified policy works" +ret=0 +$DIG txt.example3. txt @$hidden -p 5300 > dig.out.hidden || ret=1 +$DIG txt.example3. txt @$f2 -p 5300 > dig.out.f2 || ret=1 +$PERL ../digcomp.pl dig.out.hidden dig.out.f2 || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:checking that a forward only doesn't recurse" +ret=0 +$DIG txt.example4. txt @$f2 -p 5300 > dig.out.f2 || ret=1 +grep "SERVFAIL" dig.out.f2 > /dev/null || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:exit status: $status" +exit $status diff --git a/util/copyrights b/util/copyrights index ac08e88638..8deaf506b4 100644 --- a/util/copyrights +++ b/util/copyrights @@ -349,6 +349,18 @@ ./bin/tests/system/dnssec/random.data X 2000 ./bin/tests/system/dnssec/setup.sh SH 2000 ./bin/tests/system/dnssec/tests.sh SH 2000 +./bin/tests/system/forward/clean.sh SH 2000 +./bin/tests/system/forward/ns1/example.db X 2000 +./bin/tests/system/forward/ns1/named.conf CONF-C 2000 +./bin/tests/system/forward/ns1/root.db X 2000 +./bin/tests/system/forward/ns2/example.db X 2000 +./bin/tests/system/forward/ns2/named.conf CONF-C 2000 +./bin/tests/system/forward/ns2/root.db X 2000 +./bin/tests/system/forward/ns3/named.conf CONF-C 2000 +./bin/tests/system/forward/ns3/root.db X 2000 +./bin/tests/system/forward/ns4/named.conf CONF-C 2000 +./bin/tests/system/forward/ns4/root.db X 2000 +./bin/tests/system/forward/tests.sh SH 2000 ./bin/tests/system/glue/clean.sh SH 2000 ./bin/tests/system/glue/fi.good X 2000 ./bin/tests/system/glue/noglue.good X 2000