Skip Menu |

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

Report information
The Basics
Id: 112369
Status: rejected
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: paul [...] callevanetworks.com
Cc:
AdminCc:

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



Subject: ZoneFile.pm should parse $TTL case insensitively?
Date: Wed, 24 Feb 2016 16:39:04 +0000
To: "bug-Net-DNS [...] rt.cpan.org" <bug-Net-DNS [...] rt.cpan.org>
From: Paul Roberts <paul [...] callevanetworks.com>
Please excuse my ignorance, but I've been working with some zone files that have the $TTL directive in lowercase, e.g. $ttl - I am finding that ZoneFile.pm is not parsing this correctly and have had to modify it: from: } elsif (/^\$TTL/) { # directive to: } elsif (/^\$TTL/i) { # directive I also noticed it is also expecting $INCLUDE, $GENERATE and $ORIGIN to be all in upper case. Despite what the RFCs state, BIND works fine when $TTL is in lower-case, so I have hundreds of zone files to process that all use a lower case $ttl directive. I am running 0.83 but I checked 1.04 and it has the same issue. Would a request to implement case insensitive regex be valid for this for future versions or is it simply a case of BIND not following the RFCs? Cheers, Paul Paul Roberts Director Calleva Networks Ltd. Tel: +44 118 902 6622 Mob: +44 7837 362149 Email: paul@callevanetworks.com<mailto:paul@callevanetworks.com> [calleva-email-sig]<http://www.callevanetworks.com/>
Download image003.jpg
image/jpeg 3.9k
image003.jpg
From: rwfranks [...] acm.org
On Wed Feb 24 11:39:23 2016, paul@callevanetworks.com wrote: Show quoted text
> Please excuse my ignorance, but I've been working with some zone files > that have the $TTL directive in lowercase, e.g. $ttl - I am finding > that ZoneFile.pm is not parsing this correctly and have had to modify > it:
RFC2308: The Master File format [RFC 1035 Section 5] is extended to include the following directive: $TTL <TTL> [comment] Show quoted text
> I also noticed it is also expecting $INCLUDE, $GENERATE and $ORIGIN to > be all in upper case.
RFC1035 (5.1): The following entries are defined: <blank>[<comment>] $ORIGIN <domain-name> [<comment>] $INCLUDE <file-name> [<domain-name>] [<comment>] <domain-name><rr> [<comment>] <blank><rr> [<comment>] Show quoted text
> Despite what the RFCs state, BIND works fine when $TTL is in lower- > case, so I have hundreds of zone files to process that all use a lower > case $ttl directive.
trivial to fix using 2 line perl script #!/usr/bin/perl -p -i.bak s/^\$ttl/\$TTL/; Show quoted text
> Would a request to implement case insensitive regex be valid for this > for future versions or is it simply a case of BIND not following the > RFCs?
No and yes, respectively.