mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-01 00:57:32 +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"
|
"github.com/jedisct1/dlog"
|
||||||
clocksmith "github.com/jedisct1/go-clocksmith"
|
clocksmith "github.com/jedisct1/go-clocksmith"
|
||||||
stamps "github.com/jedisct1/go-dnsstamps"
|
stamps "github.com/jedisct1/go-dnsstamps"
|
||||||
|
"github.com/miekg/dns"
|
||||||
"golang.org/x/crypto/curve25519"
|
"golang.org/x/crypto/curve25519"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -453,7 +454,7 @@ func (proxy *Proxy) processIncomingQuery(serverInfo *ServerInfo, clientProto str
|
|||||||
serverInfo.noticeFailure(proxy)
|
serverInfo.noticeFailure(proxy)
|
||||||
return
|
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)
|
dlog.Infof("Server [%v] returned temporary error code [%v] -- Upstream server may be experiencing connectivity issues", serverInfo.Name, rcode)
|
||||||
serverInfo.noticeFailure(proxy)
|
serverInfo.noticeFailure(proxy)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user