diff --git a/lib/dns.js b/lib/dns.js index a71738e893ab..3ee997b2fa7c 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 1f68c53ba26b..2bf3a11856ad 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)); +}); +