Find CNAME target with DNS library?

136 views
Skip to first unread message

Kurt

unread,
Nov 16, 2010, 11:11:01 AM11/16/10
to nodejs
Is it still possible to find the target of a cname with recent
versions on the node.js DNS module? I see references to cname being a
parameter of the resolve callback in earlier versions, but that
appears to be gone now.

I need to somehow take an address with a CNAME record and check to see
where the CNAME is pointed.

Ben Noordhuis

unread,
Nov 16, 2010, 11:44:13 AM11/16/10
to nod...@googlegroups.com

CNAME lookup isn't supported (anymore? not sure if it ever worked).
I'll see if I can come up with a patch.

Kurt Mackey

unread,
Nov 16, 2010, 11:54:35 AM11/16/10
to nod...@googlegroups.com
Ah, well I'll stop digging to figure out how to do it. Maybe I'll dig
through and see if I'm smart enough to patch it. :)

> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>

Kurt Mackey

unread,
Nov 16, 2010, 4:00:19 PM11/16/10
to nod...@googlegroups.com
After digging, it seems like this is something that's not really easy
to do with the underlying c-ares lib. The query used for all the
other types doesn't actually work for cnames, so a patch for node
isn't as simple as it maybe should be.

Jérémy Lal

unread,
Nov 16, 2010, 4:10:14 PM11/16/10
to nod...@googlegroups.com, Kurt Mackey
On 16/11/2010 22:00, Kurt Mackey wrote:
> After digging, it seems like this is something that's not really easy
> to do with the underlying c-ares lib. The query used for all the
> other types doesn't actually work for cnames, so a patch for node
> isn't as simple as it maybe should be.

To which other query CNAME would be closest to ?
There's a scheduled release for c-ares soon,
so it might be the right time to propose a patch.

Ben Noordhuis

unread,
Nov 16, 2010, 4:11:15 PM11/16/10
to nod...@googlegroups.com
On Tue, Nov 16, 2010 at 22:00, Kurt Mackey <ku...@mubble.net> wrote:
> After digging, it seems like this is something that's not really easy
> to do with the underlying c-ares lib.  The query used for all the
> other types doesn't actually work for cnames, so a patch for node
> isn't as simple as it maybe should be.

I just submitted the pull request. :)

https://github.com/ry/node/pull/424

Wasn't the easy fix I thought it would be, though. Turns out there is
a buglet in c-ares that stops it from parsing CNAME query replies.

Kurt Mackey

unread,
Nov 16, 2010, 4:15:44 PM11/16/10
to nod...@googlegroups.com
Wow, you rule.

Reply all
Reply to author
Forward
0 new messages