Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 14989
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: richard.leach [...] wadh.ox.ac.uk
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.53
Fixed in: (no value)



Subject: Net::DNS::Nameserver example fails for IPv6 aware hosts
Hi, Not really a bug this, but anyway: - the example given at the bottom of the Net::DNS::Nameserver POD replies to all 'A' record requests with whatever IP address is given. However, IPv6 aware hosts (e.g. WinXP with the IPv6 driver installed) request 'AAAA' records and so receive NXDOMAIN. For the example to work with both IPv6-unaware & -aware hosts, the subroutine evaluation line could read something like: if ($qtype eq 'A' or $qtype eq 'AAAA') { Otherwise, great module, thanks for writing/maintaining it! Rich
[guest - Sun Oct 9 09:57:36 2005]: Show quoted text
> For the example to work with both IPv6-unaware & -aware hosts, the > subroutine evaluation line could read something like: > > if ($qtype eq 'A' or $qtype eq 'AAAA') {
Its even more tricky than that. The DNS servers is completely independend of the transport layer to reach the server. The example given is very very crude and violates the standard. So I have changed this a bit to do more explicit matching on qname and qtype and return the appropriate rcodes. Writing a nameserver based on Nameserver.pm is something I generally advice against. It is very easy to do protocol violation ... but then again one can do fun things. Thanks for the report. Although my solution does not address the AAAA query your report triggered me to improve the example code a bit. You;l see it appear on the next release or http://www.net-dns.org/svn/ if you are impatient :-) --Olaf