]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - testdata/auth_xfr_ixfrnotimpl.rpl
Vendor import of Unbound 1.9.1.
[FreeBSD/FreeBSD.git] / testdata / auth_xfr_ixfrnotimpl.rpl
1 ; config options
2 server:
3         target-fetch-policy: "0 0 0 0 0"
4
5 auth-zone:
6         name: "example.com."
7         ## zonefile (or none).
8         ## zonefile: "example.com.zone"
9         ## master by IP address or hostname
10         ## can list multiple masters, each on one line.
11         ## master:
12         master: 1.2.3.44
13         ## url for http fetch
14         ## url:
15         ## queries from downstream clients get authoritative answers.
16         ## for-downstream: yes
17         for-downstream: yes
18         ## queries are used to fetch authoritative answers from this zone,
19         ## instead of unbound itself sending queries there.
20         ## for-upstream: yes
21         for-upstream: yes
22         ## on failures with for-upstream, fallback to sending queries to
23         ## the authority servers
24         ## fallback-enabled: no
25
26         ## this line generates zonefile: \n"/tmp/xxx.example.com"\n
27         zonefile:
28 TEMPFILE_NAME example.com
29         ## this is the inline file /tmp/xxx.example.com
30         ## the tempfiles are deleted when the testrun is over.
31 TEMPFILE_CONTENTS example.com
32 example.com.    3600    IN      SOA     ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
33 example.com.    3600    IN      NS      ns.example.net.
34 www.example.com.        3600    IN      A       1.2.3.4
35 mail.example.com.       3600    IN      A       1.2.3.4
36 mail.example.com.       3600    IN      A       1.2.3.5
37 mail.example.com.       3600    IN      A       1.2.3.6
38 mail.example.com.       3600    IN      A       1.2.3.7
39 TEMPFILE_END
40
41 stub-zone:
42         name: "."
43         stub-addr: 193.0.14.129         # K.ROOT-SERVERS.NET.
44 CONFIG_END
45
46 SCENARIO_BEGIN Test authority zone with IXFR NOTIMPL fallback
47
48 ; K.ROOT-SERVERS.NET.
49 RANGE_BEGIN 0 100
50         ADDRESS 193.0.14.129 
51 ENTRY_BEGIN
52 MATCH opcode qtype qname
53 ADJUST copy_id
54 REPLY QR NOERROR
55 SECTION QUESTION
56 . IN NS
57 SECTION ANSWER
58 . IN NS K.ROOT-SERVERS.NET.
59 SECTION ADDITIONAL
60 K.ROOT-SERVERS.NET.     IN      A       193.0.14.129
61 ENTRY_END
62
63 ENTRY_BEGIN
64 MATCH opcode subdomain
65 ADJUST copy_id copy_query
66 REPLY QR NOERROR
67 SECTION QUESTION
68 com. IN NS
69 SECTION AUTHORITY
70 com.    IN NS   a.gtld-servers.net.
71 SECTION ADDITIONAL
72 a.gtld-servers.net.     IN      A       192.5.6.30
73 ENTRY_END
74 RANGE_END
75
76 ; a.gtld-servers.net.
77 RANGE_BEGIN 0 100
78         ADDRESS 192.5.6.30
79 ENTRY_BEGIN
80 MATCH opcode qtype qname
81 ADJUST copy_id
82 REPLY QR NOERROR
83 SECTION QUESTION
84 com. IN NS
85 SECTION ANSWER
86 com.    IN NS   a.gtld-servers.net.
87 SECTION ADDITIONAL
88 a.gtld-servers.net.     IN      A       192.5.6.30
89 ENTRY_END
90
91 ENTRY_BEGIN
92 MATCH opcode subdomain
93 ADJUST copy_id copy_query
94 REPLY QR NOERROR
95 SECTION QUESTION
96 example.com. IN NS
97 SECTION AUTHORITY
98 example.com.    IN NS   ns.example.com.
99 SECTION ADDITIONAL
100 ns.example.com. IN A 1.2.3.44
101 ENTRY_END
102 RANGE_END
103
104 ; ns.example.net.
105 RANGE_BEGIN 0 100
106         ADDRESS 1.2.3.44
107 ENTRY_BEGIN
108 MATCH opcode qtype qname
109 ADJUST copy_id
110 REPLY QR NOERROR
111 SECTION QUESTION
112 example.net. IN NS
113 SECTION ANSWER
114 example.net.    IN NS   ns.example.net.
115 SECTION ADDITIONAL
116 ns.example.net.         IN      A       1.2.3.44
117 ENTRY_END
118
119 ENTRY_BEGIN
120 MATCH opcode qtype qname
121 ADJUST copy_id
122 REPLY QR NOERROR
123 SECTION QUESTION
124 ns.example.net. IN A
125 SECTION ANSWER
126 ns.example.net. IN A    1.2.3.44
127 SECTION AUTHORITY
128 example.net.    IN NS   ns.example.net.
129 ENTRY_END
130
131 ENTRY_BEGIN
132 MATCH opcode qtype qname
133 ADJUST copy_id
134 REPLY QR NOERROR
135 SECTION QUESTION
136 ns.example.net. IN AAAA
137 SECTION AUTHORITY
138 example.net.    IN NS   ns.example.net.
139 SECTION ADDITIONAL
140 www.example.net. IN A   1.2.3.44
141 ENTRY_END
142
143 ENTRY_BEGIN
144 MATCH opcode qtype qname
145 ADJUST copy_id
146 REPLY QR NOERROR
147 SECTION QUESTION
148 example.com. IN NS
149 SECTION ANSWER
150 example.com.    IN NS   ns.example.net.
151 ENTRY_END
152
153 ENTRY_BEGIN
154 MATCH opcode qtype qname
155 ADJUST copy_id
156 REPLY QR NOERROR
157 SECTION QUESTION
158 www.example.com. IN A
159 SECTION ANSWER
160 www.example.com. IN A   10.20.30.40
161 ENTRY_END
162
163 ENTRY_BEGIN
164 MATCH opcode qtype qname
165 ADJUST copy_id
166 REPLY QR NOERROR
167 SECTION QUESTION
168 example.com. IN SOA
169 SECTION ANSWER
170 ; serial, refresh, retry, expire, minimum
171 example.com.    3600    IN      SOA     ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
172 ENTRY_END
173
174 ENTRY_BEGIN
175 MATCH opcode qtype qname
176 ADJUST copy_id
177 REPLY QR AA NOTIMPL
178 SECTION QUESTION
179 example.com. IN IXFR
180 SECTION ANSWER
181 ENTRY_END
182
183 ENTRY_BEGIN
184 MATCH opcode qtype qname
185 ADJUST copy_id
186 REPLY QR AA NOERROR
187 SECTION QUESTION
188 example.com. IN AXFR
189 SECTION ANSWER
190 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
191 example.com.    IN NS   ns.example.net.
192 EXTRA_PACKET
193 REPLY QR AA NOERROR
194 SECTION QUESTION
195 example.com. IN AXFR
196 SECTION ANSWER
197 www.example.com. IN A   1.2.3.6
198 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
199 ENTRY_END
200 RANGE_END
201
202 STEP 1 QUERY
203 ENTRY_BEGIN
204 REPLY RD
205 SECTION QUESTION
206 www.example.com. IN A
207 ENTRY_END
208 STEP 2 TIME_PASSES ELAPSE 1
209
210 ; recursion happens here.
211 STEP 20 CHECK_ANSWER
212 ENTRY_BEGIN
213 MATCH all
214 REPLY QR AA RD RA NOERROR
215 SECTION QUESTION
216 www.example.com. IN A
217 SECTION ANSWER
218 www.example.com. IN A   1.2.3.4
219 ENTRY_END
220
221 STEP 30 TIME_PASSES ELAPSE 3600
222 STEP 40 TRAFFIC
223
224 STEP 50 QUERY
225 ENTRY_BEGIN
226 REPLY RD
227 SECTION QUESTION
228 www.example.com. IN A
229 ENTRY_END
230
231 ; recursion happens here.
232 STEP 60 CHECK_ANSWER
233 ENTRY_BEGIN
234 MATCH all
235 REPLY QR AA RD RA NOERROR
236 SECTION QUESTION
237 www.example.com. IN A
238 SECTION ANSWER
239 www.example.com. IN A   1.2.3.6
240 ENTRY_END
241
242 ; the zonefile was updated with new contents
243 STEP 70 CHECK_TEMPFILE example.com
244 FILE_BEGIN
245 example.com.    3600    IN      SOA     ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
246 example.com.    3600    IN      NS      ns.example.net.
247 www.example.com.        3600    IN      A       1.2.3.6
248 FILE_END
249
250 SCENARIO_END