Skip Menu |
 

This queue is for tickets about the DNS-ZoneParse CPAN distribution.

Report information
The Basics
Id: 91964
Status: new
Priority: 0/
Queue: DNS-ZoneParse

People
Owner: Nobody in particular
Requestors: gdccyuen [...] alumni.cuhk.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Default TTL for non-soa records
Date: Thu, 9 Jan 2014 18:13:39 +0800
To: bug-DNS-ZoneParse [...] rt.cpan.org
From: Gordon CC Yuen <gdccyuen [...] gmail.com>
Download (untitled) / with headers
text/plain 1.9k
Hi, I am not sure if this is a bug or just by design. I found that if some of the non-soa records in original zone file did not have TTL specified, in the output they just pick up whatever the TTL from last record that had the TTL set. I think a more logical behavior should be using the TTL of SOA record as the default, rather than pick from last one set. Moreover, if in the same program the TTL of SOA record was changed, it will not propagate to other non-SOA records even if they all had no TTL set. Instead, the ORIGINAL TTL value of SOA record was used as default to all non-SOA records. Once again, I hope the MODIFIED TTL of SOA record can be propagate to other non-SOA records as default. The proper way to do this would be to set MODIFIED TTL of SOA record to all non-SOA records as default, once it had been changed, but as I am not familiar to perl object, I only work out how to do it on output. Here is the code change in ZoneParse.pm (v1.10): 205a206 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
212a214 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
219a222 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
225a229 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
231a236 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
237a243 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
243a250 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
249a257 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
255a264 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
261a271 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
267a278 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
275a287 Show quoted text
> $o->{ttl}=$dns_soa{$self}->{ttl} if (!$o->{ttl});
947,951d958 < } else { < if ( !defined $dns_last_ttl{$self} ) { < die "No ttl defined!\n"; < } < $record->{'ttl'} = $dns_last_ttl{$self}; Cheers, Gordon


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.