diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2010-11-16 21:50:24 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-11-21 20:53:57 -0800 |
commit | 611dffabb6b6b88f7a1f4ca259d19a42f0e8359c (patch) | |
tree | 4bd7123ff1f709e9287463848b819e2722666c38 /lib/dns.js | |
parent | 6aa92d5289996780834ebd5e9317718b3e55408c (diff) | |
download | nodejs-611dffabb6b6b88f7a1f4ca259d19a42f0e8359c.tar.gz nodejs-611dffabb6b6b88f7a1f4ca259d19a42f0e8359c.tar.bz2 nodejs-611dffabb6b6b88f7a1f4ca259d19a42f0e8359c.zip |
Support CNAME lookups in DNS module.
Diffstat (limited to 'lib/dns.js')
-rw-r--r-- | lib/dns.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/dns.js b/lib/dns.js index f9b0da228..66bb6ca23 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -199,15 +199,19 @@ exports.reverse = function(domain, callback) { exports.resolveNs = function(domain, callback) { channel.query(domain, dns.NS, callback); }; +exports.resolveCname = function(domain, callback) { + channel.query(domain, dns.CNAME, callback); +}; var resolveMap = { - 'A' : exports.resolve4, - 'AAAA': exports.resolve6, - 'MX' : exports.resolveMx, - 'TXT' : exports.resolveTxt, - 'SRV' : exports.resolveSrv, - 'PTR' : exports.resolvePtr, - 'NS' : exports.resolveNs + 'A' : exports.resolve4, + 'AAAA' : exports.resolve6, + 'MX' : exports.resolveMx, + 'TXT' : exports.resolveTxt, + 'SRV' : exports.resolveSrv, + 'PTR' : exports.resolvePtr, + 'NS' : exports.resolveNs, + 'CNAME' : exports.resolveCname }; // ERROR CODES |