[net-dns-users] handling unsupported record types

Dick Franks rwfranks at acm.org
Wed May 22 21:30:20 UTC 2013


Chris,

Revision of Net::DNS?

I do not understand why a zone transfer would fail in the way you describe.

Are you using Net::DNS::ZoneFile to read your zone data from disk?

There should be no need to hack RR.pm.
Your script needs to handle the exception condition.

    my $zone = new Net::DNS::ZoneFile( $filename );

    loop { # through RRs in zone file

        my $rr = eval { $zone->read; };        # which knows about
multi-line RRs
        if ( $@ ) {
            warn $@;
            next;
        }

        last unless $rr;

        # process RR

    }


Regards

Dick Franks

--


On 22 May 2013 20:30, Chris Buxton <clists at buxtonfamily.us> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/net-dns-users/attachments/20130522/a974bf99/attachment.htm>


More information about the net-dns-users mailing list