mirror of
https://github.com/coredns/coredns.git
synced 2025-12-17 07:45:13 -05:00
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:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user