For ommited ttls fall back to $TTL or 3600

As per RFC 2308
This commit is contained in:
Miek Gieben 2012-12-13 15:11:22 +01:00
parent 7cdb2a8bc8
commit 464a7bacf4
1 changed files with 4 additions and 3 deletions

View File

@ -227,7 +227,8 @@ func parseZone(r io.Reader, origin, f string, t chan Token, include int) {
return return
} else { } else {
h.Ttl = ttl h.Ttl = ttl
defttl = ttl // Don't about the defttl, we should take the $TTL value
// defttl = ttl
} }
st = _EXPECT_ANY_NOTTL_BL st = _EXPECT_ANY_NOTTL_BL
@ -371,7 +372,7 @@ func parseZone(r io.Reader, origin, f string, t chan Token, include int) {
return return
} else { } else {
h.Ttl = ttl h.Ttl = ttl
defttl = ttl // defttl = ttl // don't set the defttl here
} }
st = _EXPECT_ANY_NOTTL_BL st = _EXPECT_ANY_NOTTL_BL
default: default:
@ -410,7 +411,7 @@ func parseZone(r io.Reader, origin, f string, t chan Token, include int) {
return return
} else { } else {
h.Ttl = ttl h.Ttl = ttl
defttl = ttl // defttl = ttl // don't set the def ttl anymore
} }
st = _EXPECT_RRTYPE_BL st = _EXPECT_RRTYPE_BL
case _RRTYPE: case _RRTYPE: