xref: /netbsd-src/external/bsd/unbound/dist/testdata/iter_lame_noaa.rpl (revision 8450a7c42673d65e3b1f6560d3b6ecd317a6cbe8)
1; config options
2server:
3	harden-referral-path: no
4	target-fetch-policy: "0 0 0 0 0"
5
6stub-zone:
7        name: "."
8	stub-addr: 193.0.14.129         # K.ROOT-SERVERS.NET.
9CONFIG_END
10
11SCENARIO_BEGIN Test lame detection if AA bit is omitted
12; the query is answered with a reply that has
13; no AA bit
14; no SOA record
15; noanswer/noerror
16; NS record in there which is not a down delegation (==).
17; the query is not sent to a forward zone
18
19STEP 10 QUERY
20ENTRY_BEGIN
21REPLY RD
22SECTION QUESTION
23www.example.com. IN A
24ENTRY_END
25
26; root prime is sent
27STEP 20 CHECK_OUT_QUERY
28ENTRY_BEGIN
29MATCH qname qtype opcode
30SECTION QUESTION
31. IN NS
32ENTRY_END
33STEP 30 REPLY
34ENTRY_BEGIN
35MATCH opcode qtype qname
36ADJUST copy_id
37REPLY QR AA NOERROR
38SECTION QUESTION
39. IN NS
40SECTION ANSWER
41. IN NS K.ROOT-SERVERS.NET.
42SECTION ADDITIONAL
43K.ROOT-SERVERS.NET. IN A 193.0.14.129
44ENTRY_END
45
46; query sent to root server
47STEP 40 CHECK_OUT_QUERY
48ENTRY_BEGIN
49MATCH qname qtype opcode
50SECTION QUESTION
51www.example.com. IN A
52ENTRY_END
53STEP 50 REPLY
54ENTRY_BEGIN
55MATCH opcode qtype qname
56ADJUST copy_id
57REPLY QR NOERROR
58SECTION QUESTION
59www.example.com. IN A
60SECTION AUTHORITY
61com. IN NS a.gtld-servers.net.
62SECTION ADDITIONAL
63a.gtld-servers.net. IN A 192.5.6.30
64ENTRY_END
65
66; query sent to .com server
67STEP 60 CHECK_OUT_QUERY
68ENTRY_BEGIN
69MATCH qname qtype opcode
70SECTION QUESTION
71www.example.com. IN A
72ENTRY_END
73
74; answer the NS queries that have been generated
75; STEP 62 CHECK_OUT_QUERY
76; ENTRY_BEGIN
77; MATCH qname qtype opcode
78; SECTION QUESTION
79; com. IN NS
80; ENTRY_END
81;
82; STEP 63 REPLY
83; ; ENTRY_BEGIN
84; MATCH opcode qtype qname
85; ADJUST copy_id
86; REPLY QR AA NOERROR
87; SECTION QUESTION
88; com. IN NS
89; SECTION ANSWER
90; com. IN NS a.gtld-servers.net.
91; SECTION ADDITIONAL
92; a.gtld-servers.net. IN A 192.5.6.30
93; ENTRY_END
94
95STEP 70 REPLY
96ENTRY_BEGIN
97MATCH opcode qtype qname
98ADJUST copy_id
99REPLY QR NOERROR
100SECTION QUESTION
101www.example.com. IN A
102SECTION AUTHORITY
103example.com. IN NS ns1.example.com.
104example.com. IN NS ns2.example.com.
105SECTION ADDITIONAL
106ns1.example.com. IN A 168.192.2.2
107ns2.example.com. IN A 168.192.3.3
108ENTRY_END
109
110; no matter which one the iterator tries first, we present it as 'lame'
111; query to ns1.example.com or ns2.example.com.
112STEP 80 CHECK_OUT_QUERY
113ENTRY_BEGIN
114MATCH qname qtype opcode
115SECTION QUESTION
116www.example.com. IN A
117ENTRY_END
118
119; STEP 82 CHECK_OUT_QUERY
120; ENTRY_BEGIN
121; MATCH qname qtype opcode
122; SECTION QUESTION
123; example.com. IN NS
124; ENTRY_END
125;
126; STEP 83 REPLY
127; ENTRY_BEGIN
128; MATCH opcode qtype qname
129; ADJUST copy_id
130; REPLY QR AA NOERROR
131; SECTION QUESTION
132; example.com. IN NS
133; SECTION ANSWER
134; example.com. IN NS ns1.example.com.
135; example.com. IN NS ns2.example.com.
136; SECTION ADDITIONAL
137; ns1.example.com. IN A 168.192.2.2
138; ns2.example.com. IN A 168.192.3.3
139; ENTRY_END
140;
141STEP 90 REPLY
142ENTRY_BEGIN
143MATCH opcode qtype qname
144ADJUST copy_id
145REPLY QR NOERROR
146SECTION QUESTION
147www.example.com. IN A
148SECTION AUTHORITY
149; This is the BROKEN ANSWER here.
150; it is lame. A delegation to example.com. itself.
151example.com. IN NS ns1.example.com.
152example.com. IN NS ns2.example.com.
153SECTION ADDITIONAL
154ns1.example.com. IN A 168.192.2.2
155ns2.example.com. IN A 168.192.3.3
156ENTRY_END
157
158; iterator should try again and ask the other nameserver.
159STEP 100 CHECK_OUT_QUERY
160ENTRY_BEGIN
161MATCH qname qtype opcode
162SECTION QUESTION
163www.example.com. IN A
164ENTRY_END
165
166STEP 110 REPLY
167ENTRY_BEGIN
168MATCH opcode qtype qname
169ADJUST copy_id
170REPLY QR AA NOERROR
171SECTION QUESTION
172www.example.com. IN A
173SECTION ANSWER
174www.example.com. IN A 10.20.30.40
175SECTION AUTHORITY
176example.com. IN NS ns1.example.com.
177example.com. IN NS ns2.example.com.
178SECTION ADDITIONAL
179ns1.example.com. IN A 168.192.2.2
180ns2.example.com. IN A 168.192.3.3
181ENTRY_END
182
183
184; is the final answer correct?
185STEP 200 CHECK_ANSWER
186ENTRY_BEGIN
187MATCH all
188REPLY QR RD RA
189SECTION QUESTION
190www.example.com. IN A
191SECTION ANSWER
192www.example.com. IN A 10.20.30.40
193SECTION AUTHORITY
194example.com. IN NS ns1.example.com.
195example.com. IN NS ns2.example.com.
196SECTION ADDITIONAL
197ns1.example.com. IN A 168.192.2.2
198ns2.example.com. IN A 168.192.3.3
199ENTRY_END
200
201SCENARIO_END
202