You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ dig test.example.com
;test.example.com. IN A
;; ANSWER SECTION:
test.example.com. 300000 IN A 192.168.0.1
$ dig ns test.example.com
;; QUESTION SECTION:
;test.example.com. IN NS
;; ANSWER SECTION:
test.example.com. 300000 IN NS ns1.example.net.
test.example.com. 300000 IN NS ns2.example.net.
My expectation is
A Record TTL: 600
NS TTL:300000
so i changed the code:
// /geodns/zones/reader.go#setupZoneDatavardefaultTtluint32=86400ifzone.Labels[k].Ttl>0 {
defaultTtl=uint32(zone.Labels[k].Ttl)
}
ifr.RR.Header().Rrtype!=dns.TypeNS {
// NS records have special treatment. If they are not specified, they default to 86400 rather than// defaulting to the zone ttl option. The label TTL option always works thoughdefaultTtl=uint32(zone.Options.Ttl)
}
ifr.RR.Header().Ttl==0 {
r.RR.Header().Ttl=defaultTtl
}
//old codevardefaultTtluint32=86400ifr.RR.Header().Rrtype!=dns.TypeNS {
// NS records have special treatment. If they are not specified, they default to 86400 rather than// defaulting to the zone ttl option. The label TTL option always works thoughdefaultTtl=uint32(zone.Options.Ttl)
}
ifzone.Labels[k].Ttl>0 {
defaultTtl=uint32(zone.Labels[k].Ttl)
}
ifr.RR.Header().Ttl==0 {
r.RR.Header().Ttl=defaultTtl
}
dig result:
$ dig test.example.com
;; QUESTION SECTION:
;test.example.com. IN A
;; ANSWER SECTION:
test.example.com. 600 IN A 192.168.0.1
$ dig ns test.example.com
;; QUESTION SECTION:
;test.example.com. IN NS
;; ANSWER SECTION:
test.example.com. 300000 IN NS ns1.example.net.
test.example.com. 300000 IN NS ns2.example.net.
The text was updated successfully, but these errors were encountered:
I try to set NS ttl like this:
test.example.com.json
but A record ttl:
My expectation is
so i changed the code:
dig result:
The text was updated successfully, but these errors were encountered: