tjfontaine / node-dns

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

Unable to serve IVP6 'AAAA' records #38

Closed NodePing closed 11 years ago

NodePing commented 11 years ago

I'm struggling to get IPV6 records (AAAA) to be served up correctly. My dig command returns this:

$ dig -tAAAA @ns1.nodeping.com pinghostca.nodeping.com ;; Got bad packet: extra input data 85 bytes 38 c4 81 00 00 01 00 01 00 00 00 00 0a 70 69 6e 8............pin 67 68 6f 73 74 63 61 08 6e 6f 64 65 70 69 6e 67 ghostca.nodeping 03 63 6f 6d 00 00 1c 00 01 c0 0c 00 1c 00 01 00 .com............ 00 46 50 00 20 00 26 00 00 00 3c 00 01 00 00 00 .FP...&...<..... 00 00 00 00 00 00 f0 00 3c 00 91 00 ff 00 fe 00 ........<....... 93 00 ca 00 81 .....

My server code looks like:

server.on('request', function (request, response) {
    response.answer.push(dns.AAAA({ttl:18000, type:'AAAA', name:'pinghostca.nodeping.com', address:'2600:3c01::f03c:91ff:fe93:ca81'}));
    response.send();
});

No problems serving up A, or MX types... just the AAAA. What am I missing?

Thanks, Shawn

tjfontaine commented 11 years ago

Ok I had a bug in the writing of AAAA records, I've pushed a fix and published a new version.

Thanks!