[net-dns-users] handling unsupported record types
Chris Buxton
clists at buxtonfamily.us
Fri May 31 22:08:42 UTC 2013
Dick,
I'm not using eval (or wasn't until I saw your code sample), and this script in particular is not threaded.
My workstation is Mac OS X 10.8. The client was using Windows and ActivePerl (latest).
Regards,
Chris Buxton
On May 31, 2013, at 3:02 PM, Dick Franks <rwfranks at acm.org> wrote:
> Please can you let us know platform and perl revision info.
>
> Others have reported issues with eval{...} and threads
>
> Dick Franks
>
> --
>
>
> On 31 May 2013 22:15, Chris Buxton <clists at buxtonfamily.us> wrote:
> The problem occurred with Net::DNS 0.72. I was not using Net::DNS::ZoneFile to read the zone from disk.
>
> After reading these comments, I tried the script locally, on my development workstation, and it worked fine. On the client's workstation, it failed, despite having the same version of Net::DNS. I have no explanation.
>
> Thanks for the guidance.
> Chris Buxton
>
> On May 22, 2013, at 2:30 PM, Dick Franks <rwfranks at acm.org> wrote:
>
>> 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
>>
>> _______________________________________________
>> net-dns-users mailing list
>> net-dns-users at nlnetlabs.nl
>> https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users
>
>
> _______________________________________________
> net-dns-users mailing list
> net-dns-users at nlnetlabs.nl
> https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users
>
> _______________________________________________
> 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/20130531/ec29b65c/attachment.htm>
More information about the net-dns-users
mailing list