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