]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Deprecation warning for XPF settings. 11644/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 25 May 2022 07:45:08 +0000 (09:45 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 25 May 2022 07:46:22 +0000 (09:46 +0200)
Plus a tweak in the associated structured logging.

pdns/arguments.cc

index b22da985313d07216e263caa9589df7ee5f33487..fc1bbf7129f7579776b46138748e42ffb61be21d 100644 (file)
@@ -355,7 +355,9 @@ static const map<string,string> 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)));
   }
 }