diff --git a/lib/dns.js b/lib/dns.js index a71738e893a..3ee997b2fa7 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -247,7 +247,7 @@ var resolveMap = { A: exports.resolve4, MX: exports.resolveMx, TXT: exports.resolveTxt, SRV: exports.resolveSrv, - PTR: exports.resolvePtr, + PTR: exports.reverse, NS: exports.resolveNs, CNAME: exports.resolveCname }; diff --git a/test/simple/test-c-ares.js b/test/simple/test-c-ares.js index 1f68c53ba26..2bf3a11856a 100644 --- a/test/simple/test-c-ares.js +++ b/test/simple/test-c-ares.js @@ -58,3 +58,9 @@ dns.lookup('ipv6.google.com', function(error, result, addressType) { //assert.equal('string', typeof result); assert.equal(6, addressType); }); + +dns.resolve('127.0.0.1', 'PTR', function(error, domains) { + if (error) throw error; + assert.ok(Array.isArray(domains)); +}); +