Replace SERVER_ERROR with SERVFAIL

If only because SERVFAIL can be looked up on Google
This commit is contained in:
Frank Denis 2019-11-17 22:20:47 +01:00
parent 1bcd09ca5a
commit 8728361e89
2 changed files with 6 additions and 6 deletions

View file

@ -42,7 +42,7 @@ const (
PluginsReturnCodeParseError
PluginsReturnCodeNXDomain
PluginsReturnCodeResponseError
PluginsReturnCodeServerError
PluginsReturnCodeServFail
PluginsReturnCodeNetworkError
PluginsReturnCodeCloak
PluginsReturnCodeServerTimeout
@ -57,7 +57,7 @@ var PluginsReturnCodeToString = map[PluginsReturnCode]string{
PluginsReturnCodeParseError: "PARSE_ERROR",
PluginsReturnCodeNXDomain: "NXDOMAIN",
PluginsReturnCodeResponseError: "RESPONSE_ERROR",
PluginsReturnCodeServerError: "SERVER_ERROR",
PluginsReturnCodeServFail: "SERVFAIL",
PluginsReturnCodeNetworkError: "NETWORK_ERROR",
PluginsReturnCodeCloak: "CLOAK",
PluginsReturnCodeServerTimeout: "SERVER_TIMEOUT",
@ -285,7 +285,7 @@ func (pluginsState *PluginsState) ApplyResponsePlugins(pluginsGlobals *PluginsGl
case dns.RcodeNameError:
pluginsState.returnCode = PluginsReturnCodeNXDomain
case dns.RcodeServerFailure:
pluginsState.returnCode = PluginsReturnCodeServerError
pluginsState.returnCode = PluginsReturnCodeServFail
default:
pluginsState.returnCode = PluginsReturnCodeResponseError
}