net/dns/resolver: don't spam logs on EHOSTUNREACH.
Fixes
"math/rand"
"net"
"sync"
+ "syscall"
"time"
dns "golang.org/x/net/dns/dnsmessage"
@@ -371,6 +372,12 @@ func (c *fwdConn) send(packet []byte, dst netaddr.IPPort) {
backOff(err)
continue
}
+ if errors.Is(err, syscall.EHOSTUNREACH) {
+ // "No route to host." The network stack is fine, but
+ // can't talk to this destination. Not much we can do
+ // about that, don't spam logs.
+ return
+ }
if networkIsDown(err) {
// Fail.
c.logf("send: network is down")
