]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Rename the EDE setting to 'extended-resolution-errors'
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 17 Nov 2020 08:28:14 +0000 (09:28 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 18 Nov 2020 09:08:56 +0000 (10:08 +0100)
Also make RPZ and Lua EDE independent of that setting.

pdns/pdns_recursor.cc
pdns/recursordist/docs/settings.rst
regression-tests.recursor-dnssec/test_ExtendedErrors.py

index d81529d1e7f625a9685441195fea2469f90bdce0..ddaa7274a1b29608bddbd2845906170540a386c4 100644 (file)
@@ -246,7 +246,7 @@ static std::set<uint16_t> s_avoidUdpSourcePorts;
 static uint16_t s_minUdpSourcePort;
 static uint16_t s_maxUdpSourcePort;
 static double s_balancingFactor;
-static bool s_addExtendedDNSErrors;
+static bool s_addExtendedResolutionDNSErrors;
 
 RecursorControlChannel s_rcc; // only active in the handler thread
 RecursorStats g_stats;
@@ -1874,7 +1874,7 @@ static void startDoResolve(void *p)
 
     if (haveEDNS) {
       auto state = sr.getValidationState();
-      if (s_addExtendedDNSErrors && (dc->d_extendedErrorCode || vStateIsBogus(state))) {
+      if (dc->d_extendedErrorCode || (s_addExtendedResolutionDNSErrors && vStateIsBogus(state))) {
         EDNSExtendedError::code code;
         std::string extra;
 
@@ -4681,7 +4681,7 @@ static int serviceMain(int argc, char*argv[])
 
   g_statisticsInterval = ::arg().asNum("statistics-interval");
 
-  s_addExtendedDNSErrors = ::arg().mustDo("extended-errors");
+  s_addExtendedResolutionDNSErrors = ::arg().mustDo("extended-resolution-errors");
 
   {
     SuffixMatchNode dontThrottleNames;
@@ -5424,7 +5424,7 @@ int main(int argc, char **argv)
     ::arg().set("unique-response-pb-tag", "If protobuf is configured, the tag to use for messages containing unique DNS responses. Defaults to 'pdns-udr'")="pdns-udr";
 #endif /* NOD_ENABLED */
 
-    ::arg().setSwitch("extended-errors", "If set, send the EDNS Extended Error extension on DNSSEC validation failures")="no";
+    ::arg().setSwitch("extended-resolution-errors", "If set, send an EDNS Extended Error extension on resolution failures, like DNSSEC validation errors")="no";
 
     ::arg().setCmd("help","Provide a helpful message");
     ::arg().setCmd("version","Print version string");
index e3055d03d6303d4df2eb013c5f4c6438f0709abd..41dd6008040a5a5be5bfe7692a7d0a45fe6a3ca5 100644 (file)
@@ -621,16 +621,16 @@ If set, all hostnames in the `export-etc-hosts`_ file are loaded in canonical fo
 So an entry called 'pc' with ``export-etc-hosts-search-suffix='home.com'`` will lead to the generation of 'pc.home.com' within the recursor.
 An entry called 'server1.home' will be stored as 'server1.home', regardless of this setting.
 
-.. _setting-extended-errors:
+.. _setting-extended-resolution-errors:
 
-``extended-errors``
--------------------
+``extended-resolution-errors``
+------------------------------
 .. versionadded:: 4.5.0
 
 -  Boolean
 -  Default: no
 
-If set, the recursor will add an EDNS Extended Error (:rfc:`8914`) to responses failing DNSSEC validation, explaining the failure. Enabling this setting will also allow setting custom error codes from Lua or from a RPZ hit.
+If set, the recursor will add an EDNS Extended Error (:rfc:`8914`) to responses when resolution failed, like DNSSEC validation errors, explaining the reason it failed. This setting is not needed to allow setting custom error codes from Lua or from a RPZ hit.
 
 .. _setting-forward-zones:
 
index 357f762d2bfbb004bfcf724c1d839a706f85d572..df88990df5136515f3d4f2406f67304c5af6efc2 100644 (file)
@@ -20,7 +20,7 @@ disable-syslog=yes
 log-common-errors=yes
 """
     _config_template = """
-    extended-errors=yes
+    extended-resolution-errors=yes
     """
     _lua_config_file = """
     rpzFile('configs/%s/zone.rpz', { policyName="zone.rpz.", extendedErrorCode=15, extendedErrorExtra='Blocked by RPZ!'})
@@ -220,7 +220,7 @@ disable-syslog=yes
 log-common-errors=yes
 """
     _config_template = """
-    extended-errors=no
+    extended-resolution-errors=no
     """
     _roothints = None