Health-checks should respect force_tcp (#5109)

* health check should respect force_tcp

Signed-off-by: tombokombo <tombo@sysart.tech>
This commit is contained in:
Tomas Hulata
2022-02-09 15:45:52 +01:00
committed by GitHub
parent abaf938623
commit b0edae07f1
3 changed files with 49 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ type HealthChecker interface {
SetTLSConfig(*tls.Config)
SetRecursionDesired(bool)
GetRecursionDesired() bool
SetTCPTransport()
}
// dnsHc is a health checker for a DNS endpoint (DNS, and DoT).
@@ -57,6 +58,10 @@ func (h *dnsHc) GetRecursionDesired() bool {
return h.recursionDesired
}
func (h *dnsHc) SetTCPTransport() {
h.c.Net = "tcp"
}
// For HC we send to . IN NS +[no]rec message to the upstream. Dial timeouts and empty
// replies are considered fails, basically anything else constitutes a healthy upstream.