]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Not trusted, not updated, and now tested.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 4 May 2007 13:54:55 +0000 (13:54 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 4 May 2007 13:54:55 +0000 (13:54 +0000)
git-svn-id: file:///svn/unbound/trunk@286 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
testdata/rrset_untrusted.rpl [new file with mode: 0644]
testdata/rrset_updated.rpl

index 55244f47a06350edc7160a22fb7d1d04b61b994b..5a175a1850b71827edf793252fe87bed4e4f04db 100644 (file)
@@ -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 (file)
index 0000000..868ea11
--- /dev/null
@@ -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
index f40b69f77a0fdf5fd0d713f62b6774957f0983f8..146c287be4457c473cb3f3f69252897bc7993474 100644 (file)
@@ -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