Skip to content

Commit

Permalink
Improved cache efficiency on stale leaf records
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrick committed Jun 12, 2018
1 parent 4c010f8 commit 3c45b5e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions responder/recursive_dns_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,12 @@ func doQueryRecursively(rrt *ResolverRuntime, _level int) (*dns.Msg, error) {
return setupResult(rrt, dns.RcodeSuccess, cachedRR), nil
/// TODO: find a way to utilize target servers as authority section records
} else { /// not last question, we use it to set up next level, and shortcut there
rrt.targetServers[currentToken] = fetchNSAsEntity(rrt, currentToken, false, false)
rrt.currentZone = currentToken
return doQueryRecursively(rrt, _level+1)
fetchedEntities := fetchNSAsEntity(rrt, currentToken, false, false)
if fetchedEntities != nil {
rrt.targetServers[currentToken] = fetchedEntities
rrt.currentZone = currentToken
return doQueryRecursively(rrt, _level+1)
}
}
}
/// at this point we know that we can't skip an rtt to the NSes
Expand Down

0 comments on commit 3c45b5e

Please sign in to comment.