Subject: | problem whith bind9 axfr (Net::DNS:Resolver) |
i think i found a bug ni Net::DNS:Resolver in the axfr_next function.
i found this while trying to check a zone with dnswalk, which work perfectly with bind8
but not with bind9 : zone tranxsfer no more work.
i found that the probleme came from the fact that bind8
split rr records, nearly one rr per packet, in the other hand,
bind9 put all rr in a big packet
so with bind8, each call to axfr_next read one packet and return one rr,
until the end, where the last call to axfr_next read the last packet (ending duplicated SOA rr)
close axfr_sel and return 'undef'.
with bind9, the first call to axfr_next read a big packet and close axfr_sel, then following call to axfr_next
give remaining rr. but when the last rr is given, and axfr_next is called again, axfr_rr is empty and
axfr_sel is closed => error message "no zone transfer in progress"
to correct this, i think we can put explicitly an END marker in the axfr_rr array
<<Net::DNS:Resolver axfr_next function>>
if ($self->{"axfr_soa_count"} >= 2) {
$self->{"axfr_sel"} = undef;
push @{$self->{"axfr_rr"}}, undef; ###### this line added
}
feel free to ask me questions if my report is not 100% understandable.
thank you for your work this great package (Net:DNS.)
LF.