Mercurial > hg > nginx-tests
comparison mail_resolver.t @ 806:ffdd33c64193
Tests: use DNAME type in PTR type checking test in mail_resolver.t.
Use RR type different but compatible with CNAME to make sure that resolving
will still fail with resolver support added for CNAME type in return to PTR.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 16 Dec 2015 13:43:15 +0300 |
parents | a6764c2a9f12 |
children | ded6b7648d6e |
comparison
equal
deleted
inserted
replaced
805:b8db75ef1f00 | 806:ffdd33c64193 |
---|---|
250 use constant NXDOMAIN => 3; | 250 use constant NXDOMAIN => 3; |
251 | 251 |
252 use constant A => 1; | 252 use constant A => 1; |
253 use constant CNAME => 5; | 253 use constant CNAME => 5; |
254 use constant PTR => 12; | 254 use constant PTR => 12; |
255 use constant DNAME => 39; | |
255 | 256 |
256 use constant IN => 1; | 257 use constant IN => 1; |
257 | 258 |
258 # default values | 259 # default values |
259 | 260 |
301 push @rdata, pack("(C/a*)6x n2N n(C/a*)3x", | 302 push @rdata, pack("(C/a*)6x n2N n(C/a*)3x", |
302 ('1', '0', '0', '127', 'in-addr', 'arpa'), | 303 ('1', '0', '0', '127', 'in-addr', 'arpa'), |
303 PTR, IN, $ttl, 15, ('a', 'example', 'net')); | 304 PTR, IN, $ttl, 15, ('a', 'example', 'net')); |
304 | 305 |
305 } elsif ($port == 8086) { | 306 } elsif ($port == 8086) { |
306 push @rdata, rd_name(CNAME, $ttl, 'a.example.net'); | 307 push @rdata, rd_name(DNAME, $ttl, 'a.example.net'); |
308 | |
307 } | 309 } |
308 | 310 |
309 } elsif ($name eq '1.1.0.0.127.in-addr.arpa' && $type == PTR) { | 311 } elsif ($name eq '1.1.0.0.127.in-addr.arpa' && $type == PTR) { |
310 push @rdata, rd_name(PTR, $ttl, 'a.example.net'); | 312 push @rdata, rd_name(PTR, $ttl, 'a.example.net'); |
311 } | 313 } |