Subject: | Terminating dots replace existing characters. |
Terminating '.'s are applied 'interestingly'.
Sample code:
use Net::DNS::ZoneFile::Fast;
use Net::DNS::RR;
my $foo = "example.com SOA joe-bloggs.example.com. ns.example.com ( 1 2
3 4 5 )";
my $list = Net::DNS::ZoneFile::Fast::parse( text => $foo );
foreach my $what( @{$list} ){
print "NDZF: " . $what->string . "\n";
}
my $testrr = Net::DNS::RR->new( $foo );
print "NDRS: " . $testrr->string . "\n";
This produces the output below. Note that the MNAME field for
Net::DNS::ZoneFile::Fast has had the last 'm' replaced with a '.', but
the MNAME in Net::DNS::RR::SOA (0.55) has appended a '.' .
NDZF: example.com. 5 IN SOA joe-bloggs.example.com. ns.example.co. (
1 ; Serial
2 ; Refresh
3 ; Retry
4 ; Expire
5 ) ; Minimum TTL
NDRS: example.com. 0 IN SOA joe-bloggs.example.com. ns.example.com. (
1 ; Serial
2 ; Refresh
3 ; Retry
4 ; Expire
5 ) ; Minimum TTL
I'm not sure what Net::DNS::RR::SOA is doing in putting the record's TTL
down to 0, but thats a seperate bug.
At a quick look, its the calls to chop in parse_soa_number() that are
the issue; no checks are being done as to whether the field is properly
'.' terminated.
--==--
Bruce.