Type.extra (#1538)
* Revert "pkg/typify: empty messages are OtherError (#1531)"
This reverts commit fc1d73ffa9
.
* plugin/cache: add failsafeTTL
If we can not see what TTL we should put on a message to be cached, use
5 seconds as minimal TTL. We used to apply the maximum TTL to these
messages.
This commit is contained in:
parent
9719a47c1b
commit
8cce06cba1
5 changed files with 9 additions and 37 deletions
|
@ -55,7 +55,6 @@ func Typify(m *dns.Msg, t time.Time) (Type, *dns.OPT) {
|
|||
if m == nil {
|
||||
return OtherError, nil
|
||||
}
|
||||
|
||||
opt := m.IsEdns0()
|
||||
do := false
|
||||
if opt != nil {
|
||||
|
@ -77,11 +76,6 @@ func Typify(m *dns.Msg, t time.Time) (Type, *dns.OPT) {
|
|||
}
|
||||
}
|
||||
|
||||
if m.Response && len(m.Answer) == 0 && len(m.Ns) == 0 {
|
||||
// Response with nothing in it, maybe stuff in the additional section, this is not useful.
|
||||
return OtherError, opt
|
||||
}
|
||||
|
||||
// If our message contains any expired sigs and we care about that, we should return expired
|
||||
if do {
|
||||
if expired := typifyExpired(m, t); expired {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue