[Docs]
dns.resolve()
now supports resolving plain DNS PTR records. Previously, callingdns.resolve(hostname, 'PTR', cb)
would call dns.reverse() on the hostname. That is no longer the case. One must now pass the hostname as a reverse IN-ADDR domain.- Refs: 4921
Before:
dns.resolve('8.8.4.4', 'PTR', (err, result) => {
if (err) {
// handle error
}
// result => ['google-public-dns-b.google.com']
});
After:
dns.resolve('4.4.8.8-in-addr.arpa', 'PTR', (err, result) => {
if (err) {
// handle error
}
// result => ['google-public-dns-b.google.com']
});
// one could also simply do
dns.reverse('8.8.4.4', (err, result) => {
if (err) {
// handle error
}
// result => ['google-public-dns-b.google.com']
});
dns.lookupService(host, port, callback)
Previously, ifport
was not a number, aTypeError
would be thrown. Now, the port will be coerced to a number. If the port is outside the range of 0-65535, aTypeError
will be thrown.