Make the TTL returned for local answers configurable.
This commit is contained in:
1 parent
db217cd56f
commit
858a6dd253
12 files changed
+74
-47
No files matched your search
@@ -158,7 +158,7 @@ func TestTCPDNSServer(t *testing.T) {
|
||||
|
||||
t.Logf("Fallback UDP server got asked: returning %d answers", numAnswers)
|
||||
q := req.Question[0]
|
||||
m := makeAddressReply(req, &q, addrs)
|
||||
m := makeAddressReply(req, &q, addrs, DefaultLocalTTL)
|
||||
mLen := m.Len()
|
||||
m.SetEdns0(uint16(maxLen), false)
|
||||
|
||||
@@ -171,7 +171,7 @@ func TestTCPDNSServer(t *testing.T) {
|
||||
fallbackTCPHandler := func(w dns.ResponseWriter, req *dns.Msg) {
|
||||
t.Logf("Fallback TCP server got asked: returning %d answers", numAnswers)
|
||||
q := req.Question[0]
|
||||
m := makeAddressReply(req, &q, addrs)
|
||||
m := makeAddressReply(req, &q, addrs, DefaultLocalTTL)
|
||||
w.WriteMsg(m)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user