From b575462ccb35bcb57fa980055518d7580ada6006 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Sat, 8 Jul 2000 16:29:05 +0000 Subject: [PATCH] test that out-of-zone glue records are not returned --- bin/tests/system/glue/noglue.good | 14 ++++++++++++++ bin/tests/system/glue/ns1/net.db | 12 +++++++++--- bin/tests/system/glue/tests.sh | 6 +++++- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 bin/tests/system/glue/noglue.good diff --git a/bin/tests/system/glue/noglue.good b/bin/tests/system/glue/noglue.good new file mode 100644 index 0000000000..22eca7bede --- /dev/null +++ b/bin/tests/system/glue/noglue.good @@ -0,0 +1,14 @@ + +; <<>> DiG 9.0 <<>> @10.53.0.1 -p 5300 example.net a +;; global options: printcmd +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29409 +;; flags: qr rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 0 + +;; QUESTION SECTION: +;example.net. IN A + +;; AUTHORITY SECTION: +example.net. 300 IN NS ns2.example. +example.net. 300 IN NS ns1.example. + diff --git a/bin/tests/system/glue/ns1/net.db b/bin/tests/system/glue/ns1/net.db index f6a362a8c7..c297e43f16 100644 --- a/bin/tests/system/glue/ns1/net.db +++ b/bin/tests/system/glue/ns1/net.db @@ -13,7 +13,7 @@ ; ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS ; SOFTWARE. -; $Id: net.db,v 1.1 2000/07/06 01:28:07 gson Exp $ +; $Id: net.db,v 1.2 2000/07/08 16:29:05 tale Exp $ $ORIGIN net. $TTL 300 @@ -25,10 +25,16 @@ $TTL 300 600 ; minimum ) @ NS a.root-servers.nil. -a.root-servers.nil. A 10.53.0.1 -; FI. authoritative servers, for the FI. glue test +; FI. authoritative servers, for the FI. glue test. uu.net. NS ns.uu.net. NS.UU.NET. 172800 IN A 137.39.1.3 eu.net. NS ns.eu.net. NS.EU.NET. 172800 IN A 192.16.202.11 + +; Referral outside of server authority, but with glue records present. +; Don't hand out the glue. +example.net. NS ns1.example. +example.net. NS ns2.example. +ns1.example. 172800 IN A 1.1.1.1 +ns2.example. 172800 IN A 2.2.2.2 diff --git a/bin/tests/system/glue/tests.sh b/bin/tests/system/glue/tests.sh index c8fa1cce59..87535c54ab 100644 --- a/bin/tests/system/glue/tests.sh +++ b/bin/tests/system/glue/tests.sh @@ -15,7 +15,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: tests.sh,v 1.1 2000/07/06 01:28:07 gson Exp $ +# $Id: tests.sh,v 1.2 2000/07/08 16:29:03 tale Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -38,5 +38,9 @@ echo "I:testing that we find glue A/AAAA/A6 RRs in the cache" $DIG +norec @10.53.0.1 -p 5300 foo.bar.yy. a >dig.out || status=1 $PERL ../digcomp.pl yy.good dig.out || status=1 +echo "I:testing that we don't find out-of-zone glue" +$DIG +norec @10.53.0.1 -p 5300 example.net. a > dig.out || status=1 +$PERL ../digcomp.pl noglue.good dig.out || status=1 + echo "I:exit status: $status" exit $status