2 # You are running as root.
3 # You have dns{cache,log}, {tiny,pick,wall,axfr,rbl}dns accounts.
4 # You have local IP addresses 127.43.0.{1,2,3,4,5}.
5 # You are connected to the Internet.
7 # Some features not tested here:
12 # dns_resolvconfrewrite rereads after 10 minutes or 10000 uses.
13 # dns_resolvconfip rereads after 10 minutes or 10000 uses.
14 # /etc/resolv.conf is parsed properly.
15 # dns_transmit handles timeouts properly.
16 # dns_transmit falls back to TCP properly.
17 # dns_transmit handles various strange situations: e.g., NOTIMP.
23 service=`pwd`/rts-tmp/service
31 -.localhost:localhost.
32 ?:+.yp.to+.cr.yp.to+.whatever.cr.yp.to
36 DNSREWRITEFILE=rts-tmp/rewrite; export DNSREWRITEFILE
37 DNSCACHEIP=127.555.0.1; export DNSCACHEIP
40 echo '--- dnscache-conf works'
41 dnscache-conf dnscache dnslog $service/dnscache 127.555.0.1
42 echo 127.555.0.2 > $service/dnscache/root/servers/tEST
43 echo 127.555.0.2 > $service/dnscache/root/servers/tEST5
44 echo 127.555.0.4 > $service/dnscache/root/servers/43.127.iN-aDDR.aRPA
45 touch $service/dnscache/root/ip/127.43.0.1
46 supervise $service/dnscache | supervise $service/dnscache/log &
48 echo '--- tinydns-conf works'
49 tinydns-conf tinydns dnslog $service/tinydns 127.555.0.2
50 supervise $service/tinydns | supervise $service/tinydns/log &
52 echo '--- pickdns-conf works'
53 pickdns-conf pickdns dnslog $service/pickdns 127.555.0.3
54 supervise $service/pickdns | supervise $service/pickdns/log &
56 echo '--- walldns-conf works'
57 walldns-conf walldns dnslog $service/walldns 127.555.0.4
58 supervise $service/walldns | supervise $service/walldns/log &
60 echo '--- rbldns-conf works'
61 rbldns-conf rbldns dnslog $service/rbldns 127.555.0.5 RbL.TeSt
62 supervise $service/rbldns | supervise $service/rbldns/log &
64 echo '--- axfrdns-conf works'
65 axfrdns-conf axfrdns dnslog $service/axfrdns $service/tinydns 127.555.0.2
66 supervise $service/axfrdns | supervise $service/axfrdns/log &
71 echo '--- cache handles simple example'
73 one two three four five \
74 one:un one two three four five \
75 two:deux one two three four five \
76 three:trois one two three four five \
77 four:quatre one two three four five \
78 five:cinq one two three four five \
79 one:een one two three four five \
80 two:twee one two three four five \
81 three:drie one two three four five \
82 four:vier one two three four five \
83 five:vijf one two three four five
86 echo '--- cache handles overwriting'
88 one two three four five \
89 one:un one two three four five \
90 one:een one two three four five \
91 two:deux one two three four five \
92 two:twee one two three four five \
93 three:trois one two three four five \
94 three:drie one two three four five \
95 four:quatre one two three four five \
96 four:vier one two three four five \
97 five:cinq one two three four five \
98 five:vijf one two three four five
101 echo '--- cache handles long chains'
115 echo '--- dnsip finds IP address of network-surveys.cr.yp.to'
116 dnsip network-surveys.cr.yp.to
119 echo '--- dnsip does not find nonexistent.cr.yp.to'
120 dnsip nonexistent.cr.yp.to
123 echo '--- dnsip rejects overly long domain names'
124 dnsip x.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789
127 echo '--- dnsip handles IP address on input'
128 dnsip 1.2.3.4 127.0.0.1 10.555.678.901 '[010.0555.0678.0901]'
131 echo '--- dnsip allows 0 to be omitted'
135 echo '--- dnsip handles multiple IP addresses on input'
136 dnsip 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16
139 echo '--- dnsipq handles simple examples'
140 dnsipq 1.b localhost anything.localhost 5.6.7.8 network-surveys nonexistent
143 echo '--- dnsmx finds MX record for network-surveys.cr.yp.to'
144 dnsmx network-surveys.cr.yp.to
147 echo '--- dnsmx manufactures MX record for nonexistent.cr.yp.to'
148 dnsmx NONexistent.cr.yp.to
151 echo '--- dnsmx rejects overly long domain names'
152 dnsmx 0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789
155 echo '--- dnstxt finds TXT record for leap.yp.to'
159 echo '--- dnstxt does not find nonexistent.cr.yp.to'
160 dnstxt nonexistent.cr.yp.to
163 echo '--- dnstxt rejects overly long domain names'
164 dnstxt 0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789.0123456789
167 echo '--- dnsname finds host name of 131.193.178.100'
168 dnsname 131.193.178.100
171 echo '--- dnsname does not find 127.5.6.7'
175 echo '--- dnsname rejects misformatted IP addresses'
179 echo '--- dnsfilter finds some host names'
180 echo '131.193.178.100+one two three
181 127.5.6.7+one two three
182 10+one two three' | dnsfilter
191 echo '--- tinydns-data complains about unrecognized initial characters'
192 ( cd rts-tmp; tinydns-data; echo $? )
195 .movie.edu:192.249.249.3:a
196 .movie.edu::wormhole.movie.edu
197 &fx.movie.edu:192.253.254.2:a
198 &fx.movie.edu:192.253.254.3:b
199 .249.249.192.in-addr.arpa:192.249.249.3:a
200 .249.249.192.in-addr.arpa::wormhole.movie.edu
201 .253.253.192.in-addr.arpa:192.249.249.3:a
202 .253.253.192.in-addr.arpa:192.249.249.1:b
203 .253.253.192.in-addr.arpa:192.253.253.1:c
204 .254.253.192.in-addr.arpa:192.253.254.2:a
205 .254.253.192.in-addr.arpa:192.253.254.3:b
207 +localhost.movie.edu:127.0.0.1
209 @movie.edu:192.249.249.1:a
211 '\''movie.edu:Movie University
214 :movie.edu:12346:Three
215 :movie.edu:12346:Four
217 =wormhole.movie.edu:192.249.249.1
218 +wh249.movie.edu:192.249.249.1
219 =robocop.movie.edu:192.249.249.2
220 =terminator.movie.edu:192.249.249.3
221 +bigt.movie.edu:192.249.249.3
222 =diehard.movie.edu:192.249.294.4
223 +dh.movie.edu:192.249.294.4
225 =wormhole.movie.edu:192.253.253.1
226 +wh253.movie.edu:192.253.253.1
227 +wh.movie.edu:192.253.253.1
228 +wh.movie.edu:192.253.253.1
229 =misery.movie.edu:192.253.253.2
230 =shining.movie.edu:192.253.253.3
231 =carrie.movie.edu:192.253.253.4
233 .blah.movie.edu:1.2.3.4:blah.movie.edu
234 '\''blah.movie.edu:Text
236 utime rts-tmp/data 987654321
238 echo '--- tinydns-data complains if it cannot create data.tmp'
239 rm -f rts-tmp/data.tmp
240 ln -s data.tmp rts-tmp/data.tmp
241 ( cd rts-tmp; tinydns-data; echo $? )
242 rm -f rts-tmp/data.tmp
244 echo '--- tinydns-data handles simple example'
245 ( cd rts-tmp; tinydns-data; echo $? )
247 echo '--- tinydns-data produces A records'
248 ( cd rts-tmp; tinydns-get 1 wormhole.movie.edu | sort; echo $? )
250 echo '--- tinydns-data produces NS records'
251 ( cd rts-tmp; tinydns-get 2 movie.edu; echo $? )
253 echo '--- tinydns-data produces SOA records'
254 ( cd rts-tmp; tinydns-get 6 movie.edu; echo $? )
256 echo '--- tinydns-data produces PTR records'
257 ( cd rts-tmp; tinydns-get 12 1.253.253.192.in-addr.arpa; echo $? )
259 echo '--- tinydns-data produces MX records'
260 ( cd rts-tmp; tinydns-get 15 movie.edu; echo $? )
262 echo '--- tinydns-data produces TXT records'
263 ( cd rts-tmp; tinydns-get 16 movie.edu; echo $? )
265 echo '--- tinydns-data produces AXFR responses'
266 ( cd rts-tmp; tinydns-get 252 movie.edu; echo $? )
268 echo '--- tinydns-data produces ANY responses'
269 ( cd rts-tmp; tinydns-get 255 movie.edu; echo $? )
271 echo '--- tinydns-data produces records of any type'
272 ( cd rts-tmp; tinydns-get 12345 movie.edu; echo $? )
273 ( cd rts-tmp; tinydns-get 12346 movie.edu; echo $? )
275 echo '--- tinydns-data produces NODATA responses'
276 ( cd rts-tmp; tinydns-get 54321 movie.edu; echo $? )
278 echo '--- tinydns-data produces NXDOMAIN responses'
279 ( cd rts-tmp; tinydns-get 1 this.does.not.exist.movie.edu; echo $? )
281 echo '--- tinydns-data produces NXDOMAIN responses for suffixes'
282 ( cd rts-tmp; tinydns-get 1 ns.movie.edu; echo $? )
284 echo '--- tinydns-data produces NXDOMAIN ANY responses for suffixes'
285 ( cd rts-tmp; tinydns-get 255 ns.movie.edu; echo $? )
287 echo '--- tinydns-data does not produce responses outside its bailiwick'
288 ( cd rts-tmp; tinydns-get 1 edu; echo $? )
290 echo '--- tinydns-data does not include TXT in additional sections'
291 ( cd rts-tmp; tinydns-get 1 blah.movie.edu; echo $? )
296 +b.ns.test:10.2.3.6:259200
298 '\''127.test:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
299 '\''128.test:01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
300 '\''254.test:01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
301 '\''255.test:012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
302 '\''387.test:012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
303 '\''388.test:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
304 '\''400.test:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
305 '\''410.test:01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
306 '\''420.test:012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
307 '\''430.test:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
308 '\''435.test:012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
309 '\''436.test:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
310 '\''1000.test:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
311 =\000\001\177\200\277\.\.\..test:10.5.6.7
312 .7.6.5.10.in-addr.arpa:10.5.6.7
314 &x.\0\1\177\200\277\.\.\..test:10.8.9.10
318 echo '--- tinydns-data handles another example'
319 ( cd rts-tmp; tinydns-data; echo $? )
321 echo '--- tinydns-data uses serial 1 for mtime 0'
322 ( cd rts-tmp; tinydns-get Any test; echo $? )
324 echo '--- tinydns-data does not split size-127 TXT records'
325 ( cd rts-tmp; tinydns-get Txt 127.test; echo $? )
327 echo '--- tinydns-data splits size-128 TXT records'
328 ( cd rts-tmp; tinydns-get 16 128.test; echo $? )
330 echo '--- tinydns-data splits size-254 TXT records'
331 ( cd rts-tmp; tinydns-get 16 254.test; echo $? )
333 echo '--- tinydns-data doubly splits size-255 TXT records'
334 ( cd rts-tmp; tinydns-get 16 255.test; echo $? )
336 echo '--- tinydns-data excludes the additional section if necessary'
337 ( cd rts-tmp; tinydns-get 16 387.test; echo $? )
338 ( cd rts-tmp; tinydns-get 16 388.test; echo $? )
340 echo '--- tinydns-data excludes the authority section if necessary'
341 ( cd rts-tmp; tinydns-get 16 435.test; echo $? )
342 ( cd rts-tmp; tinydns-get 16 436.test; echo $? )
344 echo '--- tinydns-data handles size-1000 TXT records'
345 ( cd rts-tmp; tinydns-get 16 1000.test; echo $? )
347 echo '--- tinydns-data handles unusual characters in owner names'
348 ( cd rts-tmp; tinydns-get A '\0\1\177\200\277\56\56\56.test'; echo $? )
350 echo '--- tinydns-data handles unusual characters in PTR results'
351 ( cd rts-tmp; tinydns-get Ptr 7.6.5.10.in-addr.arpa; echo $? )
353 echo '--- tinydns-data handles delegations'
354 ( cd rts-tmp; tinydns-get 1 'x.\0\1\177\200\277\56\56\56.test'; echo $? )
355 ( cd rts-tmp; tinydns-get 1 'ns.x.\0\1\177\200\277\56\56\56.test'; echo $? )
356 ( cd rts-tmp; tinydns-get 1 'z.y.x.\0\1\177\200\277\56\56\56.test'; echo $? )
360 Ztest:Primary.Server:Host.Master:1234567:2345678:3456789:4567890:5678901:98765
362 @*.wild.test:1.2.3.7:mail.wild.test:54321:46
363 &child.test:1.2.3.5::38
368 :test:12345:Binary:43
369 Cmail.test:www.test:44
370 +*.wild.test:1.2.3.6:45
371 =override.wild.test:1.2.3.8:47
372 +*.wild.wild.test:1.2.3.9:48
373 &child.wild.test:1.2.3.10:49
374 C*.alias.wild.test:wild.test:50
378 echo '--- tinydns-data handles another example'
379 ( cd rts-tmp; tinydns-data; echo $? )
381 echo '--- tinydns-data handles TTLs'
382 ( cd rts-tmp; tinydns-get 255 test; echo $? )
383 ( cd rts-tmp; tinydns-get 255 www.test; echo $? )
384 ( cd rts-tmp; tinydns-get 255 child.test; echo $? )
386 echo '--- tinydns-data handles CNAMEs'
387 ( cd rts-tmp; tinydns-get 255 mail.test; echo $? )
388 ( cd rts-tmp; tinydns-get 5 mail.test; echo $? )
389 ( cd rts-tmp; tinydns-get 1 mail.test; echo $? )
390 ( cd rts-tmp; tinydns-get 255 foo.mail.test; echo $? )
392 echo '--- tinydns-data does not apply wildcard A to base name'
393 ( cd rts-tmp; tinydns-get 1 wild.test; echo $? )
395 echo '--- tinydns-data handles wildcard A records'
396 ( cd rts-tmp; tinydns-get 1 x.wild.test; echo $? )
397 ( cd rts-tmp; tinydns-get 1 xy.wild.test; echo $? )
398 ( cd rts-tmp; tinydns-get 1 x.z.wild.test; echo $? )
400 echo '--- tinydns-data handles wildcard MX records'
401 ( cd rts-tmp; tinydns-get 255 wild.test; echo $? )
403 echo '--- tinydns-data does not apply wildcard MX to base name'
404 ( cd rts-tmp; tinydns-get 255 x.wild.test; echo $? )
405 ( cd rts-tmp; tinydns-get 255 xy.wild.test; echo $? )
406 ( cd rts-tmp; tinydns-get 15 x.z.wild.test; echo $? )
407 ( cd rts-tmp; tinydns-get 255 x.z.wild.test; echo $? )
408 ( cd rts-tmp; tinydns-get 255 '*'.wild.test; echo $? )
410 echo '--- tinydns-data uses wildcard under base of sub-wildcard'
411 ( cd rts-tmp; tinydns-get 255 alias.wild.test; echo $? )
413 echo '--- tinydns-data handles wildcard CNAME records'
414 ( cd rts-tmp; tinydns-get 255 xyz.alias.wild.test; echo $? )
415 ( cd rts-tmp; tinydns-get 255 '*'.alias.wild.test; echo $? )
417 echo '--- tinydns-data lets explicit record override wildcard'
418 ( cd rts-tmp; tinydns-get 255 override.wild.test; echo $? )
420 echo '--- tinydns-data handles overrides sanely'
421 ( cd rts-tmp; tinydns-get 255 x.override.wild.test; echo $? )
423 echo '--- tinydns-data overrides wildcard with subdomain wildcard'
424 ( cd rts-tmp; tinydns-get 255 x.wild.wild.test; echo $? )
426 echo '--- tinydns-data overrides wildcard with delegation'
427 ( cd rts-tmp; tinydns-get 255 child.wild.test; echo $? )
428 ( cd rts-tmp; tinydns-get 255 x.child.wild.test; echo $? )
432 .four:1.2.3.4::0:30000000fedcba98
433 +www.four:1.2.3.4:0:30000000fedcba98
434 .five:1.2.3.5:::30000000fedcba98
435 +www.five:1.2.3.5::30000000fedcba98
436 .six:1.2.3.6::0:50000000fedcba98
437 +www.six:1.2.3.6:0:50000000fedcba98
438 .seven:1.2.3.7:::50000000fedcba98
439 +www.seven:1.2.3.7::50000000fedcba98
441 utime rts-tmp/data 7654321
443 echo '--- tinydns-data handles another example'
444 ( cd rts-tmp; tinydns-data; echo $? )
446 echo '--- tinydns-data handles ending time'
447 ( cd rts-tmp; tinydns-get 255 www.four; echo $? )
448 ( cd rts-tmp; tinydns-get 255 www.six; echo $? )
450 echo '--- tinydns-data handles starting time'
451 ( cd rts-tmp; tinydns-get 255 www.five; echo $? )
452 ( cd rts-tmp; tinydns-get 255 www.seven; echo $? )
455 echo '--- tinydns-edit handles simple examples'
456 echo '' > rts-tmp/data
457 ( cd rts-tmp; tinydns-edit data data.new add ns heaven.af.mil 1.2.3.5; echo $? )
458 ( cd rts-tmp; tinydns-edit data data.new add ns heaven.af.mil 1.2.3.6; echo $? )
459 ( cd rts-tmp; tinydns-edit data data.new add childns sub.heaven.af.mil 1.2.10.11; echo $? )
460 ( cd rts-tmp; tinydns-edit data data.new add childns sub.heaven.af.mil 1.2.10.12; echo $? )
461 ( cd rts-tmp; tinydns-edit data data.new add host lion.heaven.af.mil 1.2.3.4; echo $? )
462 ( cd rts-tmp; tinydns-edit data data.new add host tiger.heaven.af.mil 1.2.3.5; echo $? )
463 ( cd rts-tmp; tinydns-edit data data.new add host bear.heaven.af.mil 1.2.3.6; echo $? )
464 ( cd rts-tmp; tinydns-edit data data.new add alias www.heaven.af.mil 1.2.3.4; echo $? )
465 ( cd rts-tmp; tinydns-edit data data.new add mx heaven.af.mil 1.2.3.4; echo $? )
466 ( cd rts-tmp; tinydns-edit data data.new add mx heaven.af.mil 1.2.3.7; echo $? )
469 echo '--- tinydns-edit rejects hosts with old names or IP addresses'
470 ( cd rts-tmp; tinydns-edit data data.new add host panda.heaven.af.mil 1.2.3.6; echo $? )
471 ( cd rts-tmp; tinydns-edit data data.new add host bear.heaven.af.mil 1.2.3.8; echo $? )
474 echo '--- tinydns-edit recognizes alternate forms of host names'
475 ( cd rts-tmp; tinydns-edit data data.new add host 'BE\101r.Heaven.AF..Mil.' 1.2.3.8; echo $? )
478 echo '--- tinydns-edit copies TTLs from previous NS records'
479 echo '.test:1.2.3.4:a:3600' > rts-tmp/data
480 ( cd rts-tmp; tinydns-edit data data.new add ns test 1.2.3.5; echo $? )
487 =Www.Test:127.555.0.100
488 =Www.Test:127.555.0.101
489 @Test:127.555.0.100:a:1234
490 @Test:127.555.0.101:b:45678
491 &Pick.Test:127.555.0.3
492 &Pick2.Test:127.555.0.3
493 &Rbl.Test:127.555.0.5
495 +*.Test2:127.555.0.102
496 C*.Www.Test2:Www.Test2:5000
497 =one.Test2:127.555.0.103::300000003456789a
498 =two.Test2:127.555.0.104:0:500000003456789a
500 =Www.Test3:127.0.0.106
502 '\''Test4:001234567890123456789012345678901234567890123456789
503 '\''Test4:101234567890123456789012345678901234567890123456789
504 '\''Test4:201234567890123456789012345678901234567890123456789
505 '\''Test4:301234567890123456789012345678901234567890123456789
506 '\''Test4:401234567890123456789012345678901234567890123456789
507 '\''Test4:501234567890123456789012345678901234567890123456789
508 '\''Test4:601234567890123456789012345678901234567890123456789
509 '\''Test4:701234567890123456789012345678901234567890123456789
510 '\''Test4:801234567890123456789012345678901234567890123456789
511 '\''Test4:901234567890123456789012345678901234567890123456789
512 '\''Big.Test:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
518 .Test5:127.555.0.2:ex:::EX
519 .Test5:127.555.0.2:me:::ME
520 .Test5:127.555.0.2:i3:::i3
521 .Test5:127.555.0.2:i4:::i4
522 .Test5:127.555.0.2:i5:::i5
523 -Pick.Test5:127.555.0.100:::EX
524 +Pick.Test5:127.555.0.101:::EX
525 -Pick2.Test5:127.555.0.102:::ME
526 +Pick2.Test5:127.555.0.102:::ME
527 +Pick3.Test5:127.555.0.100
528 +Pick3.Test5:127.555.0.101:::EX
529 +Pick3.Test5:127.555.0.102:::ME
530 +Pick3.Test5:127.555.0.103:::i3
531 +Pick3.Test5:127.555.0.104:::i4
532 +Pick3.Test5:127.555.0.105:::i5
533 +*.Wild.Test5:127.555.0.100
534 +*.Wild.Test5:127.555.0.101:::EX
535 +*.Wild.Test5:127.555.0.102:::ME
536 +*.Wild.Test5:127.555.0.103:::i3
537 +*.Wild.Test5:127.555.0.104:::i4
538 +*.Wild.Test5:127.555.0.105:::i5
539 ' > $service/tinydns/root/data
540 utime $service/tinydns/root/data 987654321
541 ( cd $service/tinydns/root; tinydns-data )
544 -Pick.Test:127.555.0.100
545 +Pick.Test:127.555.0.101
546 -Pick2.Test:127.555.0.102:ME
547 +Pick2.Test:127.555.0.102:ME
549 ' > $service/pickdns/root/data
550 ( cd $service/pickdns/root; pickdns-data )
578 :127.0.0.3:See http://www.rbl.test/$
579 ' > $service/rbldns/root/data
580 ( cd $service/rbldns/root; rbldns-data )
583 127.:allow,AXFR="tEsT/TeSt2/TEst5"
585 ' > $service/axfrdns/tcp
586 ( cd $service/axfrdns; tcprules tcp.cdb tcp.tmp < tcp )
589 echo '--- dnscache handles dotted-decimal names'
590 dnsqr 255 127.43.123.234
593 echo '--- tinydns works'
594 dnsip WWW.TEST | tr ' ' '\012' | sort
598 dnsq 255 WWW.TEST 127.555.0.2 | sort
600 dnsq Any TEST 127.555.0.2
603 echo '--- dnscache handles large TXT records'
606 echo '--- walldns handles in-addr.arpa names'
609 dnsname 127.555.123.234
611 dnsip 234.123.43.127.IN-ADDR.ARPA
613 dnsq 255 234.123.43.127.IN-ADDR.ARPA 127.555.0.4
616 echo '--- walldns handles dotted-decimal names'
617 dnsq 255 127.43.123.234 127.555.0.4
620 echo '--- walldns rejects other names'
621 dnsq 255 BLAH.TEST 127.555.0.4
624 echo '--- rbldns works'
625 dnsip 2.3.4.5.rbl.test
627 dnstxt 2.3.4.5.rbl.test
629 dnsq 255 2.3.4.5.rbl.test 127.555.0.5
631 dnsip 200.255.1.4.rbl.test
633 dnstxt 200.255.1.4.rbl.test
635 dnsq 255 200.255.1.4.rbl.test 127.555.0.5
637 dnsip 200.255.0.4.rbl.test
639 dnstxt 200.255.0.4.rbl.test
641 dnsq 255 200.255.0.4.rbl.test 127.555.0.5
643 dnsip 1.0.0.4.rbl.test
645 dnstxt 1.0.0.4.rbl.test
647 dnsq 255 1.0.0.4.rbl.test 127.555.0.5
649 dnsip 0.0.0.4.rbl.test
651 dnstxt 0.0.0.4.rbl.test
653 dnsq 255 0.0.0.4.rbl.test 127.555.0.5
656 echo '--- tinydns handles differentiation'
661 dnsip PICK3.TEST5 | tr ' ' '\012' | sort
663 dnsip REALLY.WILD.TEST5 | tr ' ' '\012' | sort
665 dnsq 255 PICK.TEST5 127.555.0.2
667 dnsq 255 PICK2.TEST5 127.555.0.2
669 dnsq 255 PICK3.TEST5 127.555.0.2 | sort
671 dnsq 255 REALLY.WILD.TEST5 127.555.0.2 | sort
674 echo '--- tinydns-get handles differentiation'
675 ( cd rts-tmp/service/tinydns/root
676 tinydns-get 255 PICK.TEST5 1.2.3.4; echo $?
677 tinydns-get 255 PICK2.TEST5 1.2.3.4; echo $?
678 tinydns-get 255 PICK3.TEST5 1.2.3.4 | sort; echo $?
679 tinydns-get 255 REALLY.WILD.TEST5 1.2.3.4 | sort; echo $?
680 tinydns-get 255 PICK.TEST5 127.555.0.4; echo $?
681 tinydns-get 255 PICK2.TEST5 127.555.0.4; echo $?
682 tinydns-get 255 PICK3.TEST5 127.555.0.4 | sort; echo $?
683 tinydns-get 255 REALLY.WILD.TEST5 127.555.0.4 | sort; echo $?
686 echo '--- pickdns works'
691 dnsq 255 PICK.TEST 127.555.0.3
694 echo '--- pickdns answers MX'
698 echo '--- pickdns rejects queries for unknown information'
699 dnsq 255 PICK11.TEST 127.555.0.3
701 dnsq Txt PICK2.TEST 127.555.0.3
704 echo '--- axfrdns rejects unauthorized transfer attempts'
705 tcpclient -RHl0 127.43.0.2 53 axfr-get TEST3 rts-tmp/zone rts-tmp/zone.tmp
707 tcpclient -RHl0 127.43.0.2 53 axfr-get TEST4 rts-tmp/zone2 rts-tmp/zone2.tmp
710 echo '--- axfrdns works'
711 tcpclient -RHl0 127.43.0.2 53 axfr-get TEST rts-tmp/zone rts-tmp/zone.tmp
715 echo '--- axfrdns handles differentiation'
716 tcpclient -RHl0 -i 127.43.0.2 127.43.0.2 53 axfr-get TEST5 rts-tmp/zone5 rts-tmp/zone5.tmp
720 tcpclient -RHl0 -i 127.43.0.3 127.43.0.2 53 axfr-get TEST5 rts-tmp/zone5 rts-tmp/zone5.tmp
724 tcpclient -RHl0 -i 127.43.0.4 127.43.0.2 53 axfr-get TEST5 rts-tmp/zone5 rts-tmp/zone5.tmp
728 tcpclient -RHl0 -i 127.43.0.5 127.43.0.2 53 axfr-get TEST5 rts-tmp/zone5 rts-tmp/zone5.tmp
732 echo '--- axfrdns gives authoritative answers'
733 dnsq any Test4 127.43.0.2
736 echo '--- axfrdns handles size-1000 TXT records'
737 dnsq any BIG.TEST 127.43.0.2
740 echo '--- axfr-get handles zones with wildcards'
741 tcpclient -RHl0 127.43.0.2 53 axfr-get TEST2 rts-tmp/zone2 rts-tmp/zone2.tmp
746 svc -dx $service/dnscache
747 svc -dx $service/tinydns
748 svc -dx $service/pickdns
749 svc -dx $service/walldns
750 svc -dx $service/rbldns
751 svc -dx $service/axfrdns
753 svc -dx $service/dnscache/log
754 svc -dx $service/tinydns/log
755 svc -dx $service/pickdns/log
756 svc -dx $service/walldns/log
757 svc -dx $service/rbldns/log
758 svc -dx $service/axfrdns/log