From 38d9dc16287f72f018181f8dac6768b4eb05e930 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 6 Nov 2000 08:33:10 +0000 Subject: [PATCH] 542. [func] Add allow-update-forwarding support. --- bin/tests/system/upforwd/README | 3 +- bin/tests/system/upforwd/knowngood.after1 | 10 +++++ bin/tests/system/upforwd/knowngood.after2 | 11 +++++ bin/tests/system/upforwd/knowngood.before | 8 ++++ bin/tests/system/upforwd/ns1/example.orig | 4 +- bin/tests/system/upforwd/ns1/named.conf | 5 ++- bin/tests/system/upforwd/tests.sh | 49 +++++++++++++++++++---- bin/tests/system/upforwd/update.scp2 | 4 ++ 8 files changed, 82 insertions(+), 12 deletions(-) create mode 100644 bin/tests/system/upforwd/knowngood.after1 create mode 100644 bin/tests/system/upforwd/knowngood.after2 create mode 100644 bin/tests/system/upforwd/knowngood.before create mode 100644 bin/tests/system/upforwd/update.scp2 diff --git a/bin/tests/system/upforwd/README b/bin/tests/system/upforwd/README index c16030e42d..e35e03e255 100644 --- a/bin/tests/system/upforwd/README +++ b/bin/tests/system/upforwd/README @@ -1,7 +1,8 @@ Copyright (C) 2000 Internet Software Consortium. See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. -$Id: README,v 1.1 2000/09/08 05:40:44 marka Exp $ +$Id: README,v 1.2 2000/11/06 08:33:06 marka Exp $ ns1 stealth master ns2 slave +ns3 slave diff --git a/bin/tests/system/upforwd/knowngood.after1 b/bin/tests/system/upforwd/knowngood.after1 new file mode 100644 index 0000000000..7fc424cf29 --- /dev/null +++ b/bin/tests/system/upforwd/knowngood.after1 @@ -0,0 +1,10 @@ +example. 3600 IN SOA n1.example. hostmaster.ns1.example. 2 3600 1200 604800 7200 +example. 3600 IN NS ns2.example. +example. 3600 IN NS ns3.example. +ns1.example. 3600 IN A 10.53.0.1 +ns2.example. 3600 IN A 10.53.0.2 +ns3.example. 3600 IN A 10.53.0.3 +updated.example. 600 IN TXT "Foo" +updated.example. 600 IN A 10.10.10.1 +example. 3600 IN SOA n1.example. hostmaster.ns1.example. 2 3600 1200 604800 7200 + diff --git a/bin/tests/system/upforwd/knowngood.after2 b/bin/tests/system/upforwd/knowngood.after2 new file mode 100644 index 0000000000..eab7a2cf06 --- /dev/null +++ b/bin/tests/system/upforwd/knowngood.after2 @@ -0,0 +1,11 @@ +example. 3600 IN SOA n1.example. hostmaster.ns1.example. 3 3600 1200 604800 7200 +example. 3600 IN NS ns2.example. +example. 3600 IN NS ns3.example. +ns1.example. 3600 IN A 10.53.0.1 +ns2.example. 3600 IN A 10.53.0.2 +ns3.example. 3600 IN A 10.53.0.3 +unsigned.example. 600 IN TXT "Foo" +unsigned.example. 600 IN A 10.10.10.1 +updated.example. 600 IN TXT "Foo" +updated.example. 600 IN A 10.10.10.1 +example. 3600 IN SOA n1.example. hostmaster.ns1.example. 3 3600 1200 604800 7200 diff --git a/bin/tests/system/upforwd/knowngood.before b/bin/tests/system/upforwd/knowngood.before new file mode 100644 index 0000000000..4bde819a74 --- /dev/null +++ b/bin/tests/system/upforwd/knowngood.before @@ -0,0 +1,8 @@ +example. 3600 IN SOA n1.example. hostmaster.ns1.example. 1 3600 1200 604800 7200 +example. 3600 IN NS ns2.example. +example. 3600 IN NS ns3.example. +ns1.example. 3600 IN A 10.53.0.1 +ns2.example. 3600 IN A 10.53.0.2 +ns3.example. 3600 IN A 10.53.0.3 +example. 3600 IN SOA n1.example. hostmaster.ns1.example. 1 3600 1200 604800 7200 + diff --git a/bin/tests/system/upforwd/ns1/example.orig b/bin/tests/system/upforwd/ns1/example.orig index 91908b967e..06a3833c23 100644 --- a/bin/tests/system/upforwd/ns1/example.orig +++ b/bin/tests/system/upforwd/ns1/example.orig @@ -13,10 +13,12 @@ ; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION ; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -; $Id: example.orig,v 1.1 2000/09/08 05:40:44 marka Exp $ +; $Id: example.orig,v 1.2 2000/11/06 08:33:09 marka Exp $ @ 3600 SOA n1.example. hostmaster.ns1.example. ( 1 3600 1200 604800 7200 ) NS ns2.example. + NS ns3.example. ns1 A 10.53.0.1 ns2 A 10.53.0.2 +ns3 A 10.53.0.3 diff --git a/bin/tests/system/upforwd/ns1/named.conf b/bin/tests/system/upforwd/ns1/named.conf index 80bbc86240..4b90b9f121 100644 --- a/bin/tests/system/upforwd/ns1/named.conf +++ b/bin/tests/system/upforwd/ns1/named.conf @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named.conf,v 1.2 2000/09/08 06:27:35 marka Exp $ */ +/* $Id: named.conf,v 1.3 2000/11/06 08:33:10 marka Exp $ */ key "update.example." { algorithm "hmac-md5"; @@ -24,6 +24,7 @@ key "update.example." { options { query-source address 10.53.0.1; + transfer-source 10.53.0.1; port 5300; pid-file "named.pid"; listen-on { 10.53.0.1; }; @@ -35,5 +36,5 @@ options { zone "example" { type master; file "example.db"; - allow-update { key update.example.; }; + allow-update { key update.example.; 10.53.0.3; }; }; diff --git a/bin/tests/system/upforwd/tests.sh b/bin/tests/system/upforwd/tests.sh index 4b24be610d..37cabc5124 100644 --- a/bin/tests/system/upforwd/tests.sh +++ b/bin/tests/system/upforwd/tests.sh @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.2 2000/09/13 07:41:12 marka Exp $ +# $Id: tests.sh,v 1.3 2000/11/06 08:33:07 marka Exp $ # # Perform tests @@ -32,13 +32,18 @@ $DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ echo "I:fetching second copy of zone before update" $DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ - @10.53.0.1 axfr -p 5300 > dig.out.ns2 || status=1 + @10.53.0.2 axfr -p 5300 > dig.out.ns2 || status=1 + +echo "I:fetching third copy of zone before update" +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ + @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1 echo "I:comparing pre-update copies to known good data" -$PERL ../digcomp.pl knowngood.ns1.before dig.out.ns1 || status=1 -$PERL ../digcomp.pl knowngood.ns1.before dig.out.ns2 || status=1 +$PERL ../digcomp.pl knowngood.before dig.out.ns1 || status=1 +$PERL ../digcomp.pl knowngood.before dig.out.ns2 || status=1 +$PERL ../digcomp.pl knowngood.before dig.out.ns3 || status=1 -echo "I:updating zone" +echo "I:updating zone (signed)" # nsupdate will print a ">" prompt to stdout as it gets each input line. $NSUPDATE -y update.example:c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K < update.scp > /dev/null echo "I:sleeping 15 seconds for server to incorporate changes" @@ -50,11 +55,39 @@ $DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ echo "I:fetching second copy of zone after update" $DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ - @10.53.0.1 axfr -p 5300 > dig.out.ns2 || status=1 + @10.53.0.2 axfr -p 5300 > dig.out.ns2 || status=1 + +echo "I:fetching third copy of zone after update" +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ + @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1 echo "I:comparing post-update copies to known good data" -$PERL ../digcomp.pl knowngood.ns1.after dig.out.ns1 || status=1 -$PERL ../digcomp.pl knowngood.ns1.after dig.out.ns2 || status=1 +$PERL ../digcomp.pl knowngood.after1 dig.out.ns1 || status=1 +$PERL ../digcomp.pl knowngood.after1 dig.out.ns2 || status=1 +$PERL ../digcomp.pl knowngood.after1 dig.out.ns3 || status=1 + +echo "I:updating zone (unsigned)" +# nsupdate will print a ">" prompt to stdout as it gets each input line. +$NSUPDATE < update.scp2 > /dev/null +echo "I:sleeping 15 seconds for server to incorporate changes" +sleep 15 + +echo "I:fetching first copy of zone after update" +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ + @10.53.0.1 axfr -p 5300 > dig.out.ns1 || status=1 + +echo "I:fetching second copy of zone after update" +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ + @10.53.0.2 axfr -p 5300 > dig.out.ns2 || status=1 + +echo "I:fetching third copy of zone after update" +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\ + @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1 + +echo "I:comparing post-update copies to known good data" +$PERL ../digcomp.pl knowngood.after2 dig.out.ns1 || status=1 +$PERL ../digcomp.pl knowngood.after2 dig.out.ns2 || status=1 +$PERL ../digcomp.pl knowngood.after2 dig.out.ns3 || status=1 echo "I:exit status: $status" exit $status diff --git a/bin/tests/system/upforwd/update.scp2 b/bin/tests/system/upforwd/update.scp2 new file mode 100644 index 0000000000..beaaab9049 --- /dev/null +++ b/bin/tests/system/upforwd/update.scp2 @@ -0,0 +1,4 @@ +server 10.53.0.3 5300 +update add unsigned.example. 600 A 10.10.10.1 +update add unsigned.example. 600 TXT Foo +