Re: Suggested dns patch
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Armand, thanks for that nice patch. In fact, it fits's in perfectly, since I already started to redesign the DNS forms to allow editing of TTL and TXT records (for SPF support). Unfortunately, that was interrupted by some other ISPMan ToDos... Joerg Armand A. Verstappen wrote: > Hi, > > When ISPMan writes a zonefile using dns.bind8.lib, it will write out > lines like: > > www 1D IN A 192.168.0.1 > > > The '1D' in there comes hardcoded from ISPMan. This '1D' is the time a > caching nameserver may assume that the value will not change. This > prevents an admin to lower the ttl prior to a migration, as the TTL > minimum in the SOA is only used when the opt_ttl field is empty and no > $TTL field has previously been set. > >>From 'man named': > ------------------------------------------------------------------------ > Master File Format > The master file consists of control information and a list of > resource > records for objects in the zone of the forms: > > $INCLUDE <filename> <opt_domain> > $ORIGIN <domain> > $TTL <ttl> > <domain> <opt_ttl> <opt_class> <type> <resource_record_data> > > where: > <snip /> > ttl A integer number that sets the default time-to-live for > future records without an explicit ttl. > > opt_ttl An optional integer number for the time-to-live field. If > not set the ttl is taken from the last $TTL statement. If > no $TTL statement has occurred then the SOA minimum value > is used and a warning is generated. > ------------------------------------------------------------------------ > > dnszone.schema has: > > ------------------------------------------------------------------------ > objectclass ( 1.3.6.1.4.1.2428.20.3 NAME 'dNSZone' > SUP top STRUCTURAL > MUST ( zoneName $ relativeDomainName ) > MAY ( DNSTTL $ DNSClass $ > ARecord $ MDRecord $ MXRecord $ NSRecord $ > SOARecord $ CNAMERecord $ PTRRecord $ HINFORecord $ > MINFORecord $ TXTRecord $ SIGRecord $ KEYRecord $ > AAAARecord $ LOCRecord $ NXTRecord $ SRVRecord $ > NAPTRRecord $ KXRecord $ CERTRecord $ A6Record $ > DNAMERecord ) ) > ------------------------------------------------------------------------ > > The DNSTTL meant to hold the 'opt_ttl' value mentioned in 'man named'. > > Based on this information I have created a suggested patch that will add > '$TTL <the soa minimum value>' to the top of the zonefile. The records > themselves will try to read the DNSTTL value from the ldaprecord, and if > not present, write '\t' for the TTL value. effictively that omits the > opt_ttl value (but the '\t' will keep the file lined out and pleasing to > the eye), and the $TTL value from the top of the file is taken. As it is > now, the DNSTTL value will never be found in LDAP of course, simply > because there is no code to put it there. Probably something that should > be added sometime, as bind9-ldap will be looking for that attribute too. > > enjoy, > ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com