Logo
Explore Help
Sign In
Mirrors/coredns
1
0
Fork 0
You've already forked coredns
mirror of https://github.com/coredns/coredns.git synced 2026-10-17 15:55:47 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
d116ecb98cebc576576a93766ab4c155ecdbe31d
coredns/plugin/pkg/proxy/recverr_other.go

9 lines
157 B
Go
Raw Normal View History

plugin/pkg/proxy: set IP_RECVERR on upstream UDP sockets (#8628) Without IP_RECVERR, Linux passes only some ICMP errors, such as port unreachable, to a connected UDP socket. It drops net and host unreachable (net/ipv4/udp.c, __udp4_lib_err), so a query to an upstream behind an unreachable route waits out the read timeout before forward tries the next upstream, and health checks wait out theirs before marking it down. Set IP_RECVERR (IPV6_RECVERR for IPv6) on the UDP sockets for upstream queries and health checks, so the read fails when the ICMP error arrives. TCP sockets are left alone, and nothing changes outside Linux. The health check client gets an explicit 2s dial timeout, since a Dialer replaces dns.Client's default one. Because the Dialer now exists from the start, setDialer no longer creates a bare one when source_address is set, which also lost the dial timeout before. Fixes #8621 Signed-off-by: MohibShaikh <mohibuddin9@gmail.com>
2026-10-13 12:45:06 +05:00
//go:build !linux
package proxy
import "syscall"
// recvErr does nothing outside Linux.
func recvErr(_, _ string, _ syscall.RawConn) error { return nil }
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 34ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API