From: Wouter Wijngaards Date: Fri, 4 May 2007 13:54:55 +0000 (+0000) Subject: Not trusted, not updated, and now tested. X-Git-Tag: release-0.3~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68603f6f052091007d5b91384fe821a19f547444;p=thirdparty%2Funbound.git Not trusted, not updated, and now tested. git-svn-id: file:///svn/unbound/trunk@286 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 55244f47a..5a175a185 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -9,6 +9,8 @@ - writev used in netevent to write tcp length and data after another. This saves a roundtrip on tcp replies. - test for one rrset updated in the cache. + - test for one rrset which is not updated, as it is not deemed + trustworthy enough. 3 May 2007: Wouter - fill refs. Use new parse and encode to answer queries. diff --git a/testdata/rrset_untrusted.rpl b/testdata/rrset_untrusted.rpl new file mode 100644 index 000000000..868ea113a --- /dev/null +++ b/testdata/rrset_untrusted.rpl @@ -0,0 +1,124 @@ +; This is a comment. +; config options go here. +CONFIG_END + +SCENARIO_BEGIN Untrusted rrset not used for update + +STEP 1 QUERY +ENTRY_BEGIN + REPLY RD + SECTION QUESTION + www.example.com. IN A +ENTRY_END +; the query is sent to the forwarder - no cache yet. +STEP 2 CHECK_OUT_QUERY +ENTRY_BEGIN + MATCH qname qtype opcode + SECTION QUESTION + www.example.com. IN A +ENTRY_END +STEP 3 REPLY +ENTRY_BEGIN + MATCH opcode qtype qname + ADJUST copy_id + ; authoritative answer + REPLY QR AA RD RA NOERROR + SECTION QUESTION + www.example.com. IN A + SECTION ANSWER + www.example.com. IN A 10.20.30.40 + SECTION AUTHORITY + example.com. IN NS ns.example.com. + SECTION ADDITIONAL + ns.example.com. IN A 10.20.30.50 +ENTRY_END +STEP 4 CHECK_ANSWER +ENTRY_BEGIN + MATCH all + ; first reply, have AA set. + REPLY QR AA RD RA + SECTION QUESTION + www.example.com. IN A + SECTION ANSWER + www.example.com. IN A 10.20.30.40 + SECTION AUTHORITY + example.com. IN NS ns.example.com. + SECTION ADDITIONAL + ns.example.com. IN A 10.20.30.50 +ENTRY_END + +; another query passes along +STEP 6 QUERY +ENTRY_BEGIN + REPLY RD + SECTION QUESTION + bla.example.com. IN A +ENTRY_END +STEP 7 CHECK_OUT_QUERY +ENTRY_BEGIN + MATCH qname qtype opcode + SECTION QUESTION + bla.example.com. IN A +ENTRY_END +STEP 8 REPLY +; This answer has updated information on ns2.example.com. +; But it is nerfed into the additional. Must be ignored per rfc2181. +ENTRY_BEGIN + MATCH opcode qtype qname + ADJUST copy_id + ; authoritative answer + REPLY QR AA RD RA NOERROR + SECTION QUESTION + bla.example.com. IN A + SECTION ANSWER + bla.example.com. IN A 10.20.30.140 + SECTION AUTHORITY + SECTION ADDITIONAL + example.com. IN NS ns.eeeek.com. + example.com. IN NS ns2.eeeek.com. + ns.eeeek.com. IN A 55.44.33.22 + ns2.eeeek.com. IN A 55.44.33.24 +ENTRY_END +STEP 9 CHECK_ANSWER +ENTRY_BEGIN + MATCH all + ; first reply, have AA set. + REPLY QR AA RD RA + SECTION QUESTION + bla.example.com. IN A + SECTION ANSWER + bla.example.com. IN A 10.20.30.140 + SECTION AUTHORITY + SECTION ADDITIONAL + example.com. IN NS ns.eeeek.com. + example.com. IN NS ns2.eeeek.com. + ns.eeeek.com. IN A 55.44.33.22 + ns2.eeeek.com. IN A 55.44.33.24 +ENTRY_END + + +; original www.example.com query +STEP 10 QUERY +ENTRY_BEGIN + REPLY RD + SECTION QUESTION + www.example.com. IN A +ENTRY_END +; immediate answer without an OUT_QUERY happening (checked on exit) +; also, the answer does not have AA set +; NS rrset has not been updated from the additional seen before. +STEP 11 CHECK_ANSWER +ENTRY_BEGIN + MATCH all + REPLY QR RD RA + SECTION QUESTION + www.example.com. IN A + SECTION ANSWER + www.example.com. IN A 10.20.30.40 + SECTION AUTHORITY + example.com. IN NS ns.example.com. + SECTION ADDITIONAL + ns.example.com. IN A 10.20.30.50 +ENTRY_END + +SCENARIO_END diff --git a/testdata/rrset_updated.rpl b/testdata/rrset_updated.rpl index f40b69f77..146c287be 100644 --- a/testdata/rrset_updated.rpl +++ b/testdata/rrset_updated.rpl @@ -2,7 +2,7 @@ ; config options go here. CONFIG_END -SCENARIO_BEGIN Query receives answer from the cache +SCENARIO_BEGIN RRset is updated from other message that passes by. STEP 1 QUERY ENTRY_BEGIN