[net-dns-users] handling unsupported record types

Kelly Setzer Kelly.Setzer at wnco.com
Wed May 22 20:42:48 UTC 2013


Which version of Net::DNS?

With 0.72, I don't get this error.  Of course, it looks like the WKS record is getting parsed somehow.  The output does not match dig.

#!/usr/bin/perl
use strict;
use Net::DNS;

my $res  = Net::DNS::Resolver->new;
$res->nameservers("xaladonis02");

my @zone = $res->axfr("foo.com");

$_->print for @zone;

Script output:

foo.com.        900     IN      SOA     xaladonis02.swacorp.com. domainrequest.wnco.com. (
                                        388246610       ;serial
                                        1200            ;refresh
                                        180             ;retry
                                        1209600         ;expire
                                        3600   )        ;minimum
foo.com.        900     IN      NS      xaladonis02.swacorp.com.
bar.foo.com.    900     IN      A       10.100.10.37
sna.foo.com.    900     IN      WKS     \# 8 0a640a2606000005

Dig output:
$ dig @xaladonis02 foo.com AXFR

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> @xaladonis02 foo.com AXFR
; (1 server found)
;; global options:  printcmd
foo.com.                900     IN      SOA     xaladonis02.swacorp.com. domainrequest.wnco.com. 388246610 1200 180 1209600 3600
foo.com.                900     IN      NS      xaladonis02.swacorp.com.
bar.foo.com.            900     IN      A       10.100.10.37
sna.foo.com.            900     IN      WKS     10.100.10.38 6 21 23
foo.com.                900     IN      SOA     xaladonis02.swacorp.com. domainrequest.wnco.com. 388246610 1200 180 1209600 3600
;; Query time: 2 msec
;; SERVER: 10.35.22.203#53(10.35.22.203)
;; WHEN: Wed May 22 15:41:41 2013
;; XFR size: 5 records (messages 1)

thanks,
Kelly

-----Original Message-----
From: net-dns-users-bounces at nlnetlabs.nl [mailto:net-dns-users-bounces at nlnetlabs.nl] On Behalf Of Chris Buxton
Sent: Wednesday, May 22, 2013 2:31 PM
To: net-dns-users at nlnetlabs.nl
Subject: [net-dns-users] handling unsupported record types

I have a script that reads zones from files on disk and also via zone transfer. Currently, when reading in data, if the script encounters a record for which Net::DNS does not implement a record type class, the script dies. The immediate case looks like this:

WKS not implemented at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int/Net/DNS/RR.pm line 630.
new Net:NS::RR( ... ) at ./dnsdiff.pl line 300

Short of hacking Net::DNS::RR, how can I handle this without dying and without losing any records coming after the unknown record type in a zone transfer?

Regards,
Chris Buxton
_______________________________________________
net-dns-users mailing list
net-dns-users at nlnetlabs.nl
https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users
******* CONFIDENTIALITY NOTICE *******
This e-mail message and all attachments transmitted with it may
contain legally privileged and confidential information intended
solely for the use of the addressee. If the reader of this message
is not the intended recipient, you are hereby notified that any
reading, dissemination, distribution, copying, or other use of this
message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender
immediately and delete this message from your system. Thank you.




More information about the net-dns-users mailing list