From 7e32a0b96df460abd8fb98fbb63f4d336b9c3d03 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Wed, 25 May 2022 09:45:08 +0200 Subject: [PATCH] Deprecation warning for XPF settings. Plus a tweak in the associated structured logging. --- pdns/arguments.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pdns/arguments.cc b/pdns/arguments.cc index b22da98531..fc1bbf7129 100644 --- a/pdns/arguments.cc +++ b/pdns/arguments.cc @@ -355,7 +355,9 @@ static const map deprecateList = { { "stats-snmp-blacklist", "stats-snmp-disabled-list" }, { "edns-subnet-whitelist", "edns-subnet-allow-list" }, { "new-domain-whitelist", "new-domain-ignore-list" }, - { "snmp-master-socket", "snmp-daemon-socket" } + { "snmp-master-socket", "snmp-daemon-socket" }, + { "xpf-allow-from", "Proxy Protocol" }, + { "xpf-rr-code", "Proxy Protocol" }, }; void ArgvMap::warnIfDeprecated(const string& var) @@ -363,7 +365,7 @@ void ArgvMap::warnIfDeprecated(const string& var) const auto msg = deprecateList.find(var); if (msg != deprecateList.end()) { SLOG(g_log << Logger::Warning << "'" << var << "' is deprecated and will be removed in a future release, use '" << msg->second << "' instead" << endl, - d_log->info(Logr::Warning, "Option is deprecated and will be removed in a future release", "deprecatedName", Logging::Loggable(var), "name", Logging::Loggable(msg->second))); + d_log->info(Logr::Warning, "Option is deprecated and will be removed in a future release", "deprecatedName", Logging::Loggable(var), "alternative", Logging::Loggable(msg->second))); } } -- 2.47.2