mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2024-12-29 00:30:30 +01:00
cleanup: proxy: use symbolic code for SERVFAIL
This commit is contained in:
parent
e8ad2be9f9
commit
80fa99877f
@ -13,6 +13,7 @@ import (
|
||||
"github.com/jedisct1/dlog"
|
||||
clocksmith "github.com/jedisct1/go-clocksmith"
|
||||
stamps "github.com/jedisct1/go-dnsstamps"
|
||||
"github.com/miekg/dns"
|
||||
"golang.org/x/crypto/curve25519"
|
||||
)
|
||||
|
||||
@ -453,7 +454,7 @@ func (proxy *Proxy) processIncomingQuery(serverInfo *ServerInfo, clientProto str
|
||||
serverInfo.noticeFailure(proxy)
|
||||
return
|
||||
}
|
||||
if rcode := Rcode(response); rcode == 2 { // SERVFAIL
|
||||
if rcode := Rcode(response); rcode == dns.RcodeServerFailure {
|
||||
dlog.Infof("Server [%v] returned temporary error code [%v] -- Upstream server may be experiencing connectivity issues", serverInfo.Name, rcode)
|
||||
serverInfo.noticeFailure(proxy)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user