CC: | 305045 [...] rt.noris.net |
Subject: | bad TTL value `0' |
Net::DNS::ZoneFile::Fast considers TTLs with value 0 to be invalid.
I beg to differ, since RFC 1035 reads:
TTL a 32 bit unsigned integer that specifies the time
interval (in seconds) that the resource record may be
cached before it should be discarded. Zero values are
^^^^^^^^^^^^^^^
interpreted to mean that the RR can only be used for the
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
transaction in progress, and should not be cached.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Please find a patch attached.
Regards,
fany
Subject: | ttl.patch |
--- /usr/local/lib/perl5/site_perl/5.10.0/Net/DNS/ZoneFile/Fast.pm 2008-05-26 19:14:06.000000000 +0200
+++ Net/DNS/ZoneFile/Fast.pm 2008-09-17 18:36:53.083242672 +0200
@@ -277,7 +279,7 @@
if (/\G\s+($pat_ttl)$pat_skip$/) {
my $v = $1;
$ttl = $default_ttl = ttl_fromtext($v);
- if ($default_ttl <= 0 || $default_ttl > $MAXIMUM_TTL) {
+ if ($default_ttl < 0 || $default_ttl > $MAXIMUM_TTL) {
error("bad TTL value `$v'");
} else {
debug("\$TTL <= $default_ttl\n") if $debug;