Default TTL is off using mydnsexport
Brought to you by:
jorgebastos69
The TTLs are off for the default TTL.
The RR table has the right TTL but the SOA table does not.
It has the wrong TTL and when I use mydnsexport. Every RR shows a TTL of 7200.
Even after fixing the TTL in the SOA, mydnsexport, exports every RR with 7200.
The RRs are in the DB with a TTL of 3600.
Example:
$TTL 7200
$ORIGIN dev.orbitz.net.
@ IN SOA testbunny.com. hostmaster.testbunny.com. (
2010033100 ; Serial
1800 ; Refresh
900 ; Retry
604800 ; Expire
7200 ) ; Minimum
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I meant to add that I did the import using a zone transfer:
i.e. host -t axfr dev.orbitz.net
However the TTLs are still correct in the DB but not when exported. Each RR has a TTL of 3600 and the SOA TTL is 3600 but the export utility creates it with 7200.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Found out the reasoning. bind9 going forward is for ncache (negative cache ttl). Meaning for failed queries. The export application checks to see if ttl < minimum and if so assigns minimum. This should not be the case because they are two different values. Essentially one is a positive cache ttl and the other is a negative cache ttl.
Line 247 in export.c mydns-1.2.8
printf("\t%u\tIN %-5s\t", (rr->ttl < soa->minimum) ? soa->minimum : rr->ttl, type);
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I have tested and for me works fine.
can you provide more details ?