From 8728361e89735d9a18b53b342a647cdda23a48c9 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 17 Nov 2019 22:20:47 +0100 Subject: [PATCH] Replace SERVER_ERROR with SERVFAIL If only because SERVFAIL can be looked up on Google --- ChangeLog | 6 +++--- dnscrypt-proxy/plugins.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7253caf1..6f8d5e61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,9 +17,9 @@ service if they temporarily can't be refreshed. issue when initialization took more than 30 seconds ("The service did not respond to the start or control request in a timely fashion"). Fantastic work by Alison Winters, thanks! - - A new error code, NETWORK_ERROR, has been introduced in order to make -the distinction between network errors and servers responding with a SERVFAIL -error code. + - The `SERVER_ERROR` error code has been split into two new error code: +`NETWORK_ERROR` (self-explanatory) and `SERVFAIL` (a response was returned, +but it includes a `SERVFAIL` error code). * Version 2.0.31 - This version fixes two regressions introduced in version 2.0.29: diff --git a/dnscrypt-proxy/plugins.go b/dnscrypt-proxy/plugins.go index 12af798c..982ade26 100644 --- a/dnscrypt-proxy/plugins.go +++ b/dnscrypt-proxy/plugins.go @@ -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 }