Mercurial > hg > nginx-tests
annotate http_resolver_aaaa.t @ 1990:85d88cd5091c
Tests: SSI include stub tests.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 04 Jul 2024 17:42:55 +0300 |
parents | e4974af3fb12 |
children |
rev | line source |
---|---|
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
1 #!/usr/bin/perl |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
2 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
3 # (C) Sergey Kandaurov |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
4 # (C) Nginx, Inc. |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
5 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
6 # Tests for AAAA capable http resolver. |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
7 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
8 ############################################################################### |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
9 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
10 use warnings; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
11 use strict; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
12 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
13 use Test::More; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
14 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
15 BEGIN { use FindBin; chdir($FindBin::Bin); } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
16 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
17 use lib 'lib'; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
18 use Test::Nginx; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
19 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
20 ############################################################################### |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
21 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
22 select STDERR; $| = 1; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
23 select STDOUT; $| = 1; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
24 |
1170
cf14cfe9ec8c
Tests: dropped obsolete ipv6 prerequisite.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
25 my $t = Test::Nginx->new()->has(qw/http proxy rewrite/); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
26 |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
27 $t->write_file_expand('nginx.conf', <<'EOF'); |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
28 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
29 %%TEST_GLOBALS%% |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
30 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
31 daemon off; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
32 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
33 events { |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
34 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
35 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
36 http { |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
37 %%TEST_GLOBALS_HTTP%% |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
38 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
39 server { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
40 listen 127.0.0.1:8080; |
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
41 listen [::1]:%%PORT_8080%%; |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
42 server_name localhost; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
43 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
44 location / { |
1237
e4974af3fb12
Tests: adjusted udp ports to match allocated ports range.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1190
diff
changeset
|
45 resolver 127.0.0.1:%%PORT_8981_UDP%%; |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
46 proxy_pass http://$host:%%PORT_8080%%/backend; |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
47 |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
48 proxy_next_upstream http_504 timeout error; |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
49 proxy_intercept_errors on; |
747
50a0001a56f2
Tests: rethought 78b4e12e6efe to fix http_resolver_aaaa.t tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
734
diff
changeset
|
50 proxy_connect_timeout 50ms; |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
51 error_page 504 502 /50x; |
747
50a0001a56f2
Tests: rethought 78b4e12e6efe to fix http_resolver_aaaa.t tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
734
diff
changeset
|
52 add_header X-Host $upstream_addr; |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
53 } |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
54 location /two { |
1237
e4974af3fb12
Tests: adjusted udp ports to match allocated ports range.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1190
diff
changeset
|
55 resolver 127.0.0.1:%%PORT_8981_UDP%% 127.0.0.1:%%PORT_8982_UDP%%; |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
56 proxy_pass http://$host:%%PORT_8080%%/backend; |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
57 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
58 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
59 location /backend { |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
60 return 200; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
61 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
62 location /50x { |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
63 return 200 $upstream_addr; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
64 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
65 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
66 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
67 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
68 EOF |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
69 |
1190
fcd65708672d
Tests: let tests pass on travis-ci VMs with disabled IPv6 loopback.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1171
diff
changeset
|
70 $t->try_run('no inet6 support')->plan(72); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
71 |
1237
e4974af3fb12
Tests: adjusted udp ports to match allocated ports range.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1190
diff
changeset
|
72 $t->run_daemon(\&dns_daemon, port(8981), $t); |
e4974af3fb12
Tests: adjusted udp ports to match allocated ports range.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1190
diff
changeset
|
73 $t->run_daemon(\&dns_daemon, port(8982), $t); |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
74 |
1237
e4974af3fb12
Tests: adjusted udp ports to match allocated ports range.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1190
diff
changeset
|
75 $t->waitforfile($t->testdir . '/' . port(8981)); |
e4974af3fb12
Tests: adjusted udp ports to match allocated ports range.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1190
diff
changeset
|
76 $t->waitforfile($t->testdir . '/' . port(8982)); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
77 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
78 ############################################################################### |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
79 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
80 my (@n, $response); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
81 |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
82 my $p0 = port(8080); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
83 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
84 like(http_host_header('aaaa.example.net', '/'), qr/\[fe80::1\]/, 'AAAA'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
85 like(http_host_header('cname.example.net', '/'), qr/\[fe80::1\]/, 'CNAME'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
86 like(http_host_header('cname.example.net', '/'), qr/\[fe80::1\]/, |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
87 'CNAME cached'); |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
88 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
89 # CNAME + AAAA combined answer |
356
7a472e46772c
Tests: added http resolver test for CNAME + A combined answer.
Sergey Kandaurov <pluknet@nginx.com>
parents:
352
diff
changeset
|
90 # demonstrates the name in answer section different from what is asked |
7a472e46772c
Tests: added http resolver test for CNAME + A combined answer.
Sergey Kandaurov <pluknet@nginx.com>
parents:
352
diff
changeset
|
91 |
747
50a0001a56f2
Tests: rethought 78b4e12e6efe to fix http_resolver_aaaa.t tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
734
diff
changeset
|
92 like(http_host_header('cname_a.example.net', '/'), qr/\[::1\]/, 'CNAME + AAAA'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
93 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
94 # many AAAA records in round robin |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
95 # nonexisting IPs enumerated with proxy_next_upstream |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
96 |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
97 like(http_host_header('many.example.net', '/'), |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
98 qr/^\[fe80::(1\]:$p0, \[fe80::2\]:$p0|2\]:$p0, \[fe80::1\]:$p0)$/m, |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
99 'AAAA many'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
100 |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
101 like(http_host_header('many.example.net', '/'), |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
102 qr/^\[fe80::(1\]:$p0, \[fe80::2\]:$p0|2\]:$p0, \[fe80::1\]:$p0)$/m, |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
103 'AAAA many cached'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
104 |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
105 # tests for several resolvers specified in directive |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
106 # query bad ns, make sure that error responses are not cached |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
107 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
108 like(http_host_header('2.example.net', '/two'), qr/502 Bad/, 'two ns bad'); |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
109 |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
110 # now get correct response |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
111 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
112 like(http_host_header('2.example.net', '/two'), qr/200 OK/, 'two ns good'); |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
113 |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
114 # response is cached, actual request would get error |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
115 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
116 like(http_host_header('2.example.net', '/two'), qr/200 OK/, 'two ns cached'); |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
117 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
118 # various ipv4/ipv6 combinations |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
119 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
120 $response = http_host_header('z_z.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
121 is(@n = $response =~ /$p0/g, 0, 'zero zero responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
122 like($response, qr/502 Bad/, 'zero zero'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
123 |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
124 like(http_host_header('z_n.example.net', '/'), qr/^\[fe80::1\]:$p0$/ms, |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
125 'zero AAAA'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
126 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
127 $response = http_host_header('z_c.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
128 is(@n = $response =~ /$p0/g, 2, 'zero CNAME responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
129 like($response, qr/127.0.0.201:$p0/, 'zero CNAME 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
130 like($response, qr/\[fe80::1\]:$p0/, 'zero CNAME 2'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
131 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
132 $response = http_host_header('z_cn.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
133 is(@n = $response =~ /$p0/g, 2, 'zero CNAME+AAAA responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
134 like($response, qr/\[fe80::1\]:$p0/, 'zero CNAME+AAAA 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
135 like($response, qr/\[fe80::2\]:$p0/, 'zero CNAME+AAAA 2'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
136 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
137 $response = http_host_header('z_e.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
138 is(@n = $response =~ /$p0/g, 0, 'zero error responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
139 like($response, qr/502 Bad/, 'zero error'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
140 |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
141 like(http_host_header('n_z.example.net', '/'), qr/^127.0.0.201:$p0$/ms, |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
142 'A zero'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
143 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
144 $response = http_host_header('n_n.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
145 is(@n = $response =~ /$p0/g, 2, 'A AAAA responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
146 like($response, qr/127.0.0.201:$p0/, 'A AAAA 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
147 like($response, qr/\[fe80::1\]:$p0/, 'A AAAA 2'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
148 |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
149 like(http_host_header('n_c.example.net', '/'), qr/^127.0.0.201:$p0$/ms, |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
150 'A CNAME'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
151 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
152 $response = http_host_header('n_cn.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
153 is(@n = $response =~ /$p0/g, 4, 'A CNAME+AAAA responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
154 like($response, qr/127.0.0.201:$p0/, 'A CNAME+AAAA 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
155 like($response, qr/127.0.0.202:$p0/, 'A CNAME+AAAA 2'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
156 like($response, qr/\[fe80::1\]:$p0/, 'A CNAME+AAAA 3'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
157 like($response, qr/\[fe80::2\]:$p0/, 'A CNAME+AAAA 4'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
158 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
159 $response = http_host_header('n_e.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
160 is(@n = $response =~ /$p0/g, 0, 'A error responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
161 like($response, qr/502 Bad/, 'A error'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
162 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
163 $response = http_host_header('c_z.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
164 is(@n = $response =~ /$p0/g, 0, 'CNAME zero responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
165 like($response, qr/502 Bad/, 'CNAME zero'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
166 |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
167 like(http_host_header('c_n.example.net', '/'), qr/^\[fe80::1\]:$p0$/ms, |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
168 'CNAME AAAA'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
169 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
170 $response = http_host_header('c_c.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
171 is(@n = $response =~ /$p0/g, 2, 'CNAME CNAME responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
172 like($response, qr/127.0.0.201:$p0/, 'CNAME CNAME 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
173 like($response, qr/\[fe80::1\]:$p0/, 'CNAME CNAME 2'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
174 |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
175 like(http_host_header('c1_c2.example.net', '/'), qr/^\[fe80::1\]:$p0$/ms, |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
176 'CNAME1 CNAME2'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
177 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
178 $response = http_host_header('c_cn.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
179 is(@n = $response =~ /$p0/g, 2, 'CNAME CNAME+AAAA responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
180 like($response, qr/\[fe80::1\]:$p0/, 'CNAME CNAME+AAAA 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
181 like($response, qr/\[fe80::2\]:$p0/, 'CNAME CNAME+AAAA 1'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
182 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
183 $response = http_host_header('c_e.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
184 is(@n = $response =~ /$p0/g, 0, 'CNAME error responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
185 like($response, qr/502 Bad/, 'CNAME error'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
186 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
187 $response = http_host_header('cn_z.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
188 is(@n = $response =~ /$p0/g, 2, 'CNAME+A zero responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
189 like($response, qr/127.0.0.201:$p0/, 'CNAME+A zero 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
190 like($response, qr/127.0.0.202:$p0/, 'CNAME+A zero 2'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
191 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
192 $response = http_host_header('cn_n.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
193 is(@n = $response =~ /$p0/g, 4, 'CNAME+A AAAA responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
194 like($response, qr/127.0.0.201:$p0/, 'CNAME+A AAAA 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
195 like($response, qr/127.0.0.202:$p0/, 'CNAME+A AAAA 2'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
196 like($response, qr/\[fe80::1\]:$p0/, 'CNAME+A AAAA 3'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
197 like($response, qr/\[fe80::2\]:$p0/, 'CNAME+A AAAA 4'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
198 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
199 $response = http_host_header('cn_c.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
200 is(@n = $response =~ /$p0/g, 2, 'CNAME+A CNAME responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
201 like($response, qr/127.0.0.201:$p0/, 'CNAME+A CNAME 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
202 like($response, qr/127.0.0.202:$p0/, 'CNAME+A CNAME 2'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
203 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
204 $response = http_host_header('cn_cn.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
205 is(@n = $response =~ /$p0/g, 4, 'CNAME+A CNAME+AAAA responses'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
206 like($response, qr/127.0.0.201:$p0/, 'CNAME+A CNAME+AAAA 1'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
207 like($response, qr/127.0.0.202:$p0/, 'CNAME+A CNAME+AAAA 2'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
208 like($response, qr/\[fe80::1\]:$p0/, 'CNAME+A CNAME+AAAA 3'); |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
209 like($response, qr/\[fe80::2\]:$p0/, 'CNAME+A CNAME+AAAA 4'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
210 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
211 $response = http_host_header('cn_e.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
212 is(@n = $response =~ /$p0/g, 0, 'CNAME+A error responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
213 like($response, qr/502 Bad/, 'CNAME+A error'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
214 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
215 $response = http_host_header('e_z.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
216 is(@n = $response =~ /$p0/g, 0, 'error zero responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
217 like($response, qr/502 Bad/, 'error zero'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
218 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
219 $response = http_host_header('e_n.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
220 is(@n = $response =~ /$p0/g, 0, 'error AAAA responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
221 like($response, qr/502 Bad/, 'error AAAA'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
222 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
223 $response = http_host_header('e_c.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
224 is(@n = $response =~ /$p0/g, 0, 'error CNAME responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
225 like($response, qr/502 Bad/, 'error CNAME'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
226 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
227 $response = http_host_header('e_cn.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
228 is(@n = $response =~ /$p0/g, 0, 'error CNAME+AAAA responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
229 like($response, qr/502 Bad/, 'error CNAME+AAAA'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
230 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
231 $response = http_host_header('e_e.example.net', '/'); |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
937
diff
changeset
|
232 is(@n = $response =~ /$p0/g, 0, 'error error responses'); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
233 like($response, qr/502 Bad/, 'error error'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
234 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
235 ############################################################################### |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
236 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
237 sub http_host_header { |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
238 my ($host, $uri) = @_; |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
239 return http(<<EOF); |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
240 GET $uri HTTP/1.0 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
241 Host: $host |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
242 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
243 EOF |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
244 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
245 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
246 ############################################################################### |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
247 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
248 sub reply_handler { |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
249 my ($recv_data, $port, $state) = @_; |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
250 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
251 my (@name, @rdata); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
252 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
253 use constant NOERROR => 0; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
254 use constant SERVFAIL => 2; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
255 use constant NXDOMAIN => 3; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
256 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
257 use constant A => 1; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
258 use constant CNAME => 5; |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
259 use constant AAAA => 28; |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
260 use constant DNAME => 39; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
261 |
937
b1fa8e0cc27b
Tests: whitespaces fix.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
775
diff
changeset
|
262 use constant IN => 1; |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
263 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
264 # default values |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
265 |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
266 my ($hdr, $rcode, $ttl) = (0x8180, NOERROR, 3600); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
267 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
268 # decode name |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
269 |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
270 my ($len, $offset) = (undef, 12); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
271 while (1) { |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
272 $len = unpack("\@$offset C", $recv_data); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
273 last if $len == 0; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
274 $offset++; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
275 push @name, unpack("\@$offset A$len", $recv_data); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
276 $offset += $len; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
277 } |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
278 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
279 $offset -= 1; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
280 my ($id, $type, $class) = unpack("n x$offset n2", $recv_data); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
281 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
282 my $name = join('.', @name); |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
283 if (($name eq 'aaaa.example.net') || ($name eq 'alias.example.net')) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
284 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
285 push @rdata, rd_addr6($ttl, "fe80::1"); |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
286 } |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
287 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
288 } elsif ($name eq 'alias2.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
289 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
290 push @rdata, rd_addr($ttl, '127.0.0.201'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
291 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
292 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
293 push @rdata, rd_addr6($ttl, "fe80::1"); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
294 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
295 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
296 } elsif ($name eq 'alias4.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
297 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
298 push @rdata, rd_addr($ttl, '127.0.0.201'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
299 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
300 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
301 } elsif ($name eq 'alias6.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
302 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
303 push @rdata, rd_addr6($ttl, "fe80::1"); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
304 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
305 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
306 } elsif (($name eq 'many.example.net') && $type == AAAA) { |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
307 $state->{manycnt}++; |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
308 if ($state->{manycnt} > 1) { |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
309 $rcode = SERVFAIL; |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
310 } |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
311 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
312 push @rdata, rd_addr6($ttl, 'fe80::1'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
313 push @rdata, rd_addr6($ttl, 'fe80::2'); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
314 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
315 } elsif ($name eq 'cname.example.net') { |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
316 $state->{cnamecnt}++; |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
317 if ($state->{cnamecnt} > 2) { |
937
b1fa8e0cc27b
Tests: whitespaces fix.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
775
diff
changeset
|
318 $rcode = SERVFAIL; |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
319 } |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
320 push @rdata, pack("n3N nCa5n", 0xc00c, CNAME, IN, $ttl, |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
321 8, 5, 'alias', 0xc012); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
322 |
356
7a472e46772c
Tests: added http resolver test for CNAME + A combined answer.
Sergey Kandaurov <pluknet@nginx.com>
parents:
352
diff
changeset
|
323 } elsif ($name eq 'cname_a.example.net') { |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
324 push @rdata, pack("n3N nCa5n", 0xc00c, CNAME, IN, $ttl, |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
325 8, 5, 'alias', 0xc014); |
356
7a472e46772c
Tests: added http resolver test for CNAME + A combined answer.
Sergey Kandaurov <pluknet@nginx.com>
parents:
352
diff
changeset
|
326 |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
327 # points to "alias" set in previous rdata |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
328 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
329 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
330 push @rdata, pack('n3N nn8', 0xc031, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
331 16, expand_ip6("::1")); |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
332 } |
356
7a472e46772c
Tests: added http resolver test for CNAME + A combined answer.
Sergey Kandaurov <pluknet@nginx.com>
parents:
352
diff
changeset
|
333 |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
334 } elsif ($name eq '2.example.net') { |
1237
e4974af3fb12
Tests: adjusted udp ports to match allocated ports range.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1190
diff
changeset
|
335 if ($port == port(8981)) { |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
336 $state->{twocnt}++; |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
337 } |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
338 if ($state->{twocnt} & 1) { |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
339 $rcode = SERVFAIL; |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
340 } |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
341 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
342 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
343 push @rdata, rd_addr6($ttl, '::1'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
344 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
345 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
346 } elsif ($name eq 'z_z.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
347 # assume no answers given |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
348 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
349 } elsif ($name eq 'z_n.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
350 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
351 push @rdata, rd_addr6($ttl, 'fe80::1'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
352 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
353 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
354 } elsif ($name eq 'z_c.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
355 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
356 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
357 9, 6, 'alias2', 0xc010); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
358 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
359 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
360 } elsif ($name eq 'z_cn.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
361 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
362 push @rdata, pack("n3N nCa5n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
363 8, 5, 'alias', 0xc011); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
364 push @rdata, pack('n3N nn8', 0xc02e, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
365 16, expand_ip6("fe80::1")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
366 push @rdata, pack('n3N nn8', 0xc02e, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
367 16, expand_ip6("fe80::2")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
368 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
369 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
370 } elsif ($name eq 'z_e.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
371 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
372 $rcode = SERVFAIL; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
373 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
374 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
375 } elsif ($name eq 'n_z.example.net') { |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
376 if ($type == A) { |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
377 push @rdata, rd_addr($ttl, '127.0.0.201'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
378 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
379 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
380 } elsif ($name eq 'n_n.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
381 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
382 push @rdata, rd_addr($ttl, '127.0.0.201'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
383 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
384 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
385 push @rdata, rd_addr6($ttl, 'fe80::1'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
386 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
387 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
388 } elsif ($name eq 'n_c.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
389 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
390 push @rdata, rd_addr($ttl, '127.0.0.201'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
391 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
392 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
393 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
394 9, 6, 'alias2', 0xc010); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
395 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
396 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
397 } elsif ($name eq 'n_cn.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
398 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
399 push @rdata, rd_addr($ttl, '127.0.0.201'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
400 push @rdata, rd_addr($ttl, '127.0.0.202'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
401 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
402 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
403 push @rdata, pack("n3N nCa5n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
404 8, 5, 'alias', 0xc011); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
405 push @rdata, pack('n3N nn8', 0xc02e, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
406 16, expand_ip6("fe80::1")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
407 push @rdata, pack('n3N nn8', 0xc02e, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
408 16, expand_ip6("fe80::2")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
409 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
410 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
411 } elsif ($name eq 'n_e.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
412 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
413 push @rdata, rd_addr($ttl, '127.0.0.201'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
414 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
415 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
416 $rcode = SERVFAIL; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
417 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
418 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
419 } elsif ($name eq 'c_z.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
420 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
421 push @rdata, pack("n3N nCa5n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
422 8, 5, 'alias', 0xc010); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
423 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
424 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
425 } elsif ($name eq 'c_n.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
426 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
427 push @rdata, pack("n3N nCa5n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
428 8, 5, 'alias', 0xc010); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
429 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
430 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
431 push @rdata, rd_addr6($ttl, "fe80::1"); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
432 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
433 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
434 } elsif ($name eq 'c_c.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
435 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
436 9, 6, 'alias2', 0xc010); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
437 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
438 } elsif ($name eq 'c1_c2.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
439 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
440 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
441 9, 6, 'alias4', 0xc012); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
442 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
443 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
444 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
445 9, 6, 'alias6', 0xc012); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
446 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
447 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
448 } elsif ($name eq 'c_cn.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
449 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
450 9, 6, 'alias2', 0xc011); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
451 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
452 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
453 push @rdata, pack('n3N nn8', 0xc02e, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
454 16, expand_ip6("fe80::1")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
455 push @rdata, pack('n3N nn8', 0xc02e, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
456 16, expand_ip6("fe80::2")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
457 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
458 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
459 } elsif ($name eq 'cn_z.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
460 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
461 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
462 9, 6, 'alias2', 0xc011); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
463 push @rdata, pack("n3N nC4", 0xc02e, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
464 4, split('\.', '127.0.0.201')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
465 push @rdata, pack("n3N nC4", 0xc02e, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
466 4, split('\.', '127.0.0.202')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
467 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
468 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
469 } elsif ($name eq 'cn_n.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
470 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
471 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
472 9, 6, 'alias2', 0xc011); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
473 push @rdata, pack("n3N nC4", 0xc02e, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
474 4, split('\.', '127.0.0.201')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
475 push @rdata, pack("n3N nC4", 0xc02e, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
476 4, split('\.', '127.0.0.202')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
477 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
478 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
479 push @rdata, pack('n3N nn8', 0xc00c, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
480 16, expand_ip6("fe80::1")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
481 push @rdata, pack('n3N nn8', 0xc00c, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
482 16, expand_ip6("fe80::2")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
483 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
484 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
485 } elsif ($name eq 'cn_c.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
486 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
487 9, 6, 'alias2', 0xc011); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
488 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
489 push @rdata, pack("n3N nC4", 0xc02e, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
490 4, split('\.', '127.0.0.201')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
491 push @rdata, pack("n3N nC4", 0xc02e, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
492 4, split('\.', '127.0.0.202')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
493 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
494 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
495 } elsif ($name eq 'cn_cn.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
496 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
497 9, 6, 'alias2', 0xc012); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
498 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
499 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
500 push @rdata, pack("n3N nC4", 0xc02f, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
501 4, split('\.', '127.0.0.201')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
502 push @rdata, pack("n3N nC4", 0xc02f, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
503 4, split('\.', '127.0.0.202')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
504 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
505 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
506 push @rdata, pack('n3N nn8', 0xc02f, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
507 16, expand_ip6("fe80::1")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
508 push @rdata, pack('n3N nn8', 0xc02f, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
509 16, expand_ip6("fe80::2")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
510 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
511 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
512 } elsif ($name eq 'cn_e.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
513 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
514 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
515 9, 6, 'alias2', 0xc011); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
516 push @rdata, pack("n3N nC4", 0xc02e, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
517 4, split('\.', '127.0.0.201')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
518 push @rdata, pack("n3N nC4", 0xc02e, A, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
519 4, split('\.', '127.0.0.202')); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
520 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
521 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
522 $rcode = SERVFAIL; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
523 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
524 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
525 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
526 } elsif ($name eq 'e_z.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
527 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
528 $rcode = SERVFAIL; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
529 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
530 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
531 } elsif ($name eq 'e_n.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
532 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
533 $rcode = SERVFAIL; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
534 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
535 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
536 push @rdata, rd_addr6($ttl, 'fe80::1'); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
537 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
538 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
539 } elsif ($name eq 'e_c.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
540 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
541 $rcode = SERVFAIL; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
542 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
543 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
544 push @rdata, pack("n3N nCa6n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
545 9, 6, 'alias2', 0xc010); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
546 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
547 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
548 } elsif ($name eq 'e_cn.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
549 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
550 $rcode = SERVFAIL; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
551 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
552 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
553 push @rdata, pack("n3N nCa5n", 0xc00c, CNAME, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
554 8, 5, 'alias', 0xc011); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
555 push @rdata, pack('n3N nn8', 0xc02e, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
556 16, expand_ip6("fe80::1")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
557 push @rdata, pack('n3N nn8', 0xc02e, AAAA, IN, $ttl, |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
558 16, expand_ip6("fe80::2")); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
559 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
560 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
561 } elsif ($name eq 'e_e.example.net') { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
562 if ($type == A) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
563 $rcode = SERVFAIL; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
564 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
565 if ($type == AAAA) { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
566 $rcode = NXDOMAIN; |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
567 } |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
568 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
569 |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
570 $len = @name; |
775
a6764c2a9f12
Tests: fixed DNS label coding in resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
747
diff
changeset
|
571 pack("n6 (C/a*)$len x n2", $id, $hdr | $rcode, 1, scalar @rdata, |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
572 0, 0, @name, $type, $class) . join('', @rdata); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
573 } |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
574 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
575 sub rd_addr { |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
576 my ($ttl, $addr) = @_; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
577 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
578 my $code = 'split(/\./, $addr)'; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
579 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
580 pack 'n3N nC4', 0xc00c, A, IN, $ttl, eval "scalar $code", eval($code); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
581 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
582 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
583 sub expand_ip6 { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
584 my ($addr) = @_; |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
585 |
360
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
586 substr ($addr, index($addr, "::"), 2) = |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
587 join "0", map { ":" } (0 .. 8 - (split /:/, $addr) + 1); |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
588 map { hex "0" x (4 - length $_) . "$_" } split /:/, $addr; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
589 } |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
590 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
591 sub rd_addr6 { |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
592 my ($ttl, $addr) = @_; |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
593 |
82db241184e0
Tests: added AAAA specific resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
359
diff
changeset
|
594 pack 'n3N nn8', 0xc00c, AAAA, IN, $ttl, 16, expand_ip6($addr); |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
595 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
596 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
597 sub dns_daemon { |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
598 my ($port, $t) = @_; |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
599 |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
600 my ($data, $recv_data); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
601 my $socket = IO::Socket::INET->new( |
937
b1fa8e0cc27b
Tests: whitespaces fix.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
775
diff
changeset
|
602 LocalAddr => '127.0.0.1', |
b1fa8e0cc27b
Tests: whitespaces fix.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
775
diff
changeset
|
603 LocalPort => $port, |
b1fa8e0cc27b
Tests: whitespaces fix.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
775
diff
changeset
|
604 Proto => 'udp', |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
605 ) |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
606 or die "Can't create listening socket: $!\n"; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
607 |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
608 # track number of relevant queries |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
609 |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
610 my %state = ( |
937
b1fa8e0cc27b
Tests: whitespaces fix.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
775
diff
changeset
|
611 cnamecnt => 0, |
b1fa8e0cc27b
Tests: whitespaces fix.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
775
diff
changeset
|
612 twocnt => 0, |
b1fa8e0cc27b
Tests: whitespaces fix.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
775
diff
changeset
|
613 manycnt => 0, |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
614 ); |
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
615 |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
616 # signal we are ready |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
617 |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
618 open my $fh, '>', $t->testdir() . '/' . $port; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
619 close $fh; |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
620 |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
621 while (1) { |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
622 $socket->recv($recv_data, 65536); |
359
cdab739eb6ea
Tests: resolver tests enabled to work with AAAA capable resolver.
Sergey Kandaurov <pluknet@nginx.com>
parents:
357
diff
changeset
|
623 $data = reply_handler($recv_data, $port, \%state); |
357
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
624 $socket->send($data); |
e0c00e695cb5
Tests: removed Net::DNS dependency.
Sergey Kandaurov <pluknet@nginx.com>
parents:
356
diff
changeset
|
625 } |
352
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
626 } |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
627 |
145c37f27c5a
Tests: added resolver tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
628 ############################################################################### |