Skip to content

[DNS] Reverse DNS resolution returns - (dash) character #4229

Description

@Mickael-van-der-Beek

I encountered a strange behaviour on the dns.reverse() method. e.g:

If you resolve the domain name www.fagron.com to an IP address:

dns.resolve4('www.fagron.com', function (e, addresses) {
    console.log(addresses); // [ '87.233.241.210' ]
});

If you now re-use this IPv4 address and do a reverse DNS resolution:

dns.reverse('87.233.241.210', function (e, hostnames) {
    console.log(hostnames); // [ '-' ]
});

It seems fairly strange that the returned value is a - dash character (45) since you would expect that:

  • if an error occurred, the error is returned and the hostnames argument is undefined
  • if no hostname is found at all, the hostnames argument is an empty array []

Node.js version is: v4.2.2
Operating system version is: Darwin myhostname.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dnsIssues and PRs related to the dns subsystem.questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions