From: Remi Gacogne Date: Tue, 26 Jan 2021 11:43:12 +0000 (+0100) Subject: dnsdist: Fix issues and comments from the code review X-Git-Tag: dnsdist-1.6.0-alpha1~14^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9974%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Fix issues and comments from the code review --- diff --git a/pdns/dnsdist-lua-actions.cc b/pdns/dnsdist-lua-actions.cc index de150f10f7..c488e649fc 100644 --- a/pdns/dnsdist-lua-actions.cc +++ b/pdns/dnsdist-lua-actions.cc @@ -1680,7 +1680,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("NoRecurseAction", []() { - warnlog("access to NoRecurseAction is deprecated, please use SetNoRecurseAction instead"); + warnlog("access to NoRecurseAction is deprecated and will be removed in a future version, please use SetNoRecurseAction instead"); return std::shared_ptr(new SetNoRecurseAction); }); @@ -1689,7 +1689,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("MacAddrAction", [](int code) { - warnlog("access to MacAddrAction is deprecated, please use SetMacAddrAction instead"); + warnlog("access to MacAddrAction is deprecated and will be removed in a future version, please use SetMacAddrAction instead"); return std::shared_ptr(new SetMacAddrAction(code)); }); @@ -1760,7 +1760,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("DisableValidationAction", []() { - warnlog("access to DisableValidationAction is deprecated, please use SetDisableValidationAction instead"); + warnlog("access to DisableValidationAction is deprecated and will be removed in a future version, please use SetDisableValidationAction instead"); return std::shared_ptr(new SetDisableValidationAction); }); @@ -1791,7 +1791,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("SkipCacheAction", []() { - warnlog("access to SkipCacheAction is deprecated, please use SetSkipCacheAction instead"); + warnlog("access to SkipCacheAction is deprecated and will be removed in a future version, please use SetSkipCacheAction instead"); return std::shared_ptr(new SetSkipCacheAction); }); @@ -1804,7 +1804,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("TempFailureCacheTTLAction", [](int maxTTL) { - warnlog("access to TempFailureCacheTTLAction is deprecated, please use SetTempFailureCacheTTLAction instead"); + warnlog("access to TempFailureCacheTTLAction is deprecated and will be removed in a future version, please use SetTempFailureCacheTTLAction instead"); return std::shared_ptr(new SetTempFailureCacheTTLAction(maxTTL)); }); @@ -1895,7 +1895,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("ECSPrefixLengthAction", [](uint16_t v4PrefixLength, uint16_t v6PrefixLength) { - warnlog("access to ECSPrefixLengthAction is deprecated, please use SetECSPrefixLengthAction instead"); + warnlog("access to ECSPrefixLengthAction is deprecated and will be removed in a future version, please use SetECSPrefixLengthAction instead"); return std::shared_ptr(new SetECSPrefixLengthAction(v4PrefixLength, v6PrefixLength)); }); @@ -1904,7 +1904,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("ECSOverrideAction", [](bool ecsOverride) { - warnlog("access to ECSOverrideAction is deprecated, please use SetECSOverrideAction instead"); + warnlog("access to ECSOverrideAction is deprecated and will be removed in a future version, please use SetECSOverrideAction instead"); return std::shared_ptr(new SetECSOverrideAction(ecsOverride)); }); @@ -1913,7 +1913,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("DisableECSAction", []() { - warnlog("access to DisableECSAction is deprecated, please use SetDisableECSAction instead"); + warnlog("access to DisableECSAction is deprecated and will be removed in a future version, please use SetDisableECSAction instead"); return std::shared_ptr(new SetDisableECSAction()); }); @@ -1945,7 +1945,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("TagAction", [](std::string tag, std::string value) { - warnlog("access to TagAction is deprecated, please use SetTagAction instead"); + warnlog("access to TagAction is deprecated and will be removed in a future version, please use SetTagAction instead"); return std::shared_ptr(new SetTagAction(tag, value)); }); @@ -1954,7 +1954,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("TagResponseAction", [](std::string tag, std::string value) { - warnlog("access to TagResponseAction is deprecated, please use SetTagResponseAction instead"); + warnlog("access to TagResponseAction is deprecated and will be removed in a future version, please use SetTagResponseAction instead"); return std::shared_ptr(new SetTagResponseAction(tag, value)); }); @@ -1983,7 +1983,7 @@ void setupLuaActions(LuaContext& luaCtx) }); luaCtx.writeFunction("SetNegativeAndSOAAction", [](bool nxd, const std::string& zone, uint32_t ttl, const std::string& mname, const std::string& rname, uint32_t serial, uint32_t refresh, uint32_t retry, uint32_t expire, uint32_t minimum, boost::optional vars) { - warnlog("access to SetNegativeAndSOAAction is deprecated, please use NegativeAndSOAAction instead"); + warnlog("access to SetNegativeAndSOAAction is deprecated and will be removed in a future version, please use NegativeAndSOAAction instead"); auto ret = std::shared_ptr(new NegativeAndSOAAction(nxd, DNSName(zone), ttl, DNSName(mname), DNSName(rname), serial, refresh, retry, expire, minimum)); auto action = std::dynamic_pointer_cast(ret); parseResponseConfig(vars, action->d_responseConfig); diff --git a/pdns/dnsdistdist/docs/rules-actions.rst b/pdns/dnsdistdist/docs/rules-actions.rst index 62a4f68ce8..a7833d4502 100644 --- a/pdns/dnsdistdist/docs/rules-actions.rst +++ b/pdns/dnsdistdist/docs/rules-actions.rst @@ -1270,7 +1270,7 @@ The following actions exist. .. deprecated:: 1.6.0 - This function has been deprecated in 1.6.0, please use :func:`NoRecurseAction` instead. + This function has been deprecated in 1.6.0, please use :func:`SetNoRecurseAction` instead. Strip RD bit from the question, let it go through. Subsequent rules are processed after this action. @@ -1619,7 +1619,7 @@ The following actions exist. .. versionadded:: 1.3.0 - .. deprecated:: 1.6.0 + .. deprecated:: 1.6.0 This function has been deprecated in 1.6.0, please use :func:`SetTagAction` instead.