tjfontaine / node-dns

Replacement dns module in pure javascript for node.js
MIT License
585 stars 154 forks source link

resolving multicast dns names fails with ENOENT #85

Open timbertson opened 9 years ago

timbertson commented 9 years ago

This library doesn't seem to resolve multicast dns names, while the builtin dns module does.

Test script:

var dns = require('native-dns');
var builtinDns = require('dns');

var resolve = function(domain) {
  console.log("resolving " + domain);
  builtinDns.lookup(domain, 4, function(err, address) {
    console.log("builtin module returned", err, address);
  });
  dns.lookup(domain, 4, function(err, address) {
    console.log("native module returned", err, address);
  });
};

resolve('nixos-vm1.local');

output:

resolving nixos-vm1.local
native module returned { [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' } undefined
builtin module returned null 192.168.1.109

Running on Linux (fedora 21, x86_64) with avahi-daemon and NetworkManager