mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Set SOA record TTL as min of TTL/MINIMUM (#2295)
* Set SOA record TTL as min of TTL/MINIMUM According to https://tools.ietf.org/html/rfc2308#section-3: The TTL of this record is set from the minimum of the MINIMUM field of the SOA record and the TTL of the SOA itself, and indicates how long a resolver may cache the negative answer. Set the TTL accordingly so as to not always negative cache SOA records for 300 seconds. * Inline min func * Update SOA record tests * Fix types
This commit is contained in:
committed by
Chris O'Haver
parent
3f6dfba1f0
commit
8dbe1fbee2
@@ -75,7 +75,7 @@ var dnsTestCasesOther = []test.Case{
|
||||
// NODATA as this is not an Mail: true record.
|
||||
Qname: "a.server1.dev.region1.skydns.test.", Qtype: dns.TypeMX,
|
||||
Ns: []dns.RR{
|
||||
test.SOA("skydns.test. 300 SOA ns.dns.skydns.test. hostmaster.skydns.test. 0 0 0 0 0"),
|
||||
test.SOA("skydns.test. 30 SOA ns.dns.skydns.test. hostmaster.skydns.test. 0 0 0 0 0"),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user