mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
net/dns/resolver: don't spam logs on EHOSTUNREACH.
Fixes #1719. Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
0141390365
commit
7fab244614
@ -14,6 +14,7 @@
|
||||
"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")
|
||||
|
Loading…
Reference in New Issue
Block a user