From: Tomek Mrugalski Date: Fri, 20 Jan 2023 08:39:55 +0000 (+0100) Subject: [#2693] Print deprecated warning for libreload X-Git-Tag: Kea-2.3.4~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=877d1cfad37bd41d7d7db105ff6de0b83ca710e2;p=thirdparty%2Fkea.git [#2693] Print deprecated warning for libreload --- diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc index 75256ced87..dd7d5b45b4 100644 --- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc +++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc @@ -823,6 +823,7 @@ ControlledDhcpv4Srv::processCommand(const string& command, return (srv->commandShutdownHandler(command, args)); } else if (command == "libreload") { + LOG_WARN(dhcp4_logger, DHCP4_DEPRECATED).arg("libreload command"); return (srv->commandLibReloadHandler(command, args)); } else if (command == "config-reload") { diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc index 306bee64ab..df8984622e 100644 --- a/src/bin/dhcp4/dhcp4_messages.cc +++ b/src/bin/dhcp4/dhcp4_messages.cc @@ -53,6 +53,7 @@ extern const isc::log::MessageID DHCP4_DECLINE_LEASE_MISMATCH = "DHCP4_DECLINE_L extern const isc::log::MessageID DHCP4_DECLINE_LEASE_NOT_FOUND = "DHCP4_DECLINE_LEASE_NOT_FOUND"; extern const isc::log::MessageID DHCP4_DEFERRED_OPTION_MISSING = "DHCP4_DEFERRED_OPTION_MISSING"; extern const isc::log::MessageID DHCP4_DEFERRED_OPTION_UNPACK_FAIL = "DHCP4_DEFERRED_OPTION_UNPACK_FAIL"; +extern const isc::log::MessageID DHCP4_DEPRECATED = "DHCP4_DEPRECATED"; extern const isc::log::MessageID DHCP4_DEVELOPMENT_VERSION = "DHCP4_DEVELOPMENT_VERSION"; extern const isc::log::MessageID DHCP4_DHCP4O6_BAD_PACKET = "DHCP4_DHCP4O6_BAD_PACKET"; extern const isc::log::MessageID DHCP4_DHCP4O6_HOOK_SUBNET4_SELECT_DROP = "DHCP4_DHCP4O6_HOOK_SUBNET4_SELECT_DROP"; @@ -222,6 +223,7 @@ const char* values[] = { "DHCP4_DECLINE_LEASE_NOT_FOUND", "Received DHCPDECLINE for addr %1 from client %2, but no such lease found.", "DHCP4_DEFERRED_OPTION_MISSING", "can find deferred option code %1 in the query", "DHCP4_DEFERRED_OPTION_UNPACK_FAIL", "An error unpacking the deferred option %1: %2", + "DHCP4_DEPRECATED", "The following mechanism is now deprecated and will be removed in the future: %1", "DHCP4_DEVELOPMENT_VERSION", "This software is a development branch of Kea. It is not recommended for production use.", "DHCP4_DHCP4O6_BAD_PACKET", "received malformed DHCPv4o6 packet: %1", "DHCP4_DHCP4O6_HOOK_SUBNET4_SELECT_DROP", "%1: packet was dropped, because a callout set the next step to 'drop'", diff --git a/src/bin/dhcp4/dhcp4_messages.h b/src/bin/dhcp4/dhcp4_messages.h index b5ead0792d..31ffe3e152 100644 --- a/src/bin/dhcp4/dhcp4_messages.h +++ b/src/bin/dhcp4/dhcp4_messages.h @@ -54,6 +54,7 @@ extern const isc::log::MessageID DHCP4_DECLINE_LEASE_MISMATCH; extern const isc::log::MessageID DHCP4_DECLINE_LEASE_NOT_FOUND; extern const isc::log::MessageID DHCP4_DEFERRED_OPTION_MISSING; extern const isc::log::MessageID DHCP4_DEFERRED_OPTION_UNPACK_FAIL; +extern const isc::log::MessageID DHCP4_DEPRECATED; extern const isc::log::MessageID DHCP4_DEVELOPMENT_VERSION; extern const isc::log::MessageID DHCP4_DHCP4O6_BAD_PACKET; extern const isc::log::MessageID DHCP4_DHCP4O6_HOOK_SUBNET4_SELECT_DROP; diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes index 9748d82167..33b1c43521 100644 --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@ -276,6 +276,11 @@ A debug message issued when deferred unpacking of an option failed, making it to be left unpacked in the packet. The first argument is the option code, the second the error. +% DHCP4_DEPRECATED The following mechanism is now deprecated and will be removed in the future: %1 +The mechanism specified by parameter 1 is deprecated. It is functional, but +there is a plan to remove this capability in the future version. You +should plan your strategy to stop using it soon. + % DHCP4_DEVELOPMENT_VERSION This software is a development branch of Kea. It is not recommended for production use. This warning message is displayed when the version is a development (vs stable) one: the second number of the version is odd. diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc index 67cf64d62e..c81cf45d42 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc @@ -826,6 +826,7 @@ ControlledDhcpv6Srv::processCommand(const string& command, return (srv->commandShutdownHandler(command, args)); } else if (command == "libreload") { + LOG_WARN(dhcp6_logger, DHCP6_DEPRECATED).arg("libreload command"); return (srv->commandLibReloadHandler(command, args)); } else if (command == "config-reload") { diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc index 577f784076..24d60ee944 100644 --- a/src/bin/dhcp6/dhcp6_messages.cc +++ b/src/bin/dhcp6/dhcp6_messages.cc @@ -54,6 +54,7 @@ extern const isc::log::MessageID DHCP6_DECLINE_FAIL_LEASE_WITHOUT_DUID = "DHCP6_ extern const isc::log::MessageID DHCP6_DECLINE_FAIL_NO_LEASE = "DHCP6_DECLINE_FAIL_NO_LEASE"; extern const isc::log::MessageID DHCP6_DECLINE_LEASE = "DHCP6_DECLINE_LEASE"; extern const isc::log::MessageID DHCP6_DECLINE_PROCESS_IA = "DHCP6_DECLINE_PROCESS_IA"; +extern const isc::log::MessageID DHCP6_DEPRECATED = "DHCP6_DEPRECATED"; extern const isc::log::MessageID DHCP6_DEVELOPMENT_VERSION = "DHCP6_DEVELOPMENT_VERSION"; extern const isc::log::MessageID DHCP6_DHCP4O6_PACKET_RECEIVED = "DHCP6_DHCP4O6_PACKET_RECEIVED"; extern const isc::log::MessageID DHCP6_DHCP4O6_RECEIVE_FAIL = "DHCP6_DHCP4O6_RECEIVE_FAIL"; @@ -221,6 +222,7 @@ const char* values[] = { "DHCP6_DECLINE_FAIL_NO_LEASE", "Client %1 sent DECLINE for address %2, but there's no lease for it", "DHCP6_DECLINE_LEASE", "Client %1 sent DECLINE for address %2 and the server marked it as declined. The lease will be recovered in %3 seconds.", "DHCP6_DECLINE_PROCESS_IA", "Processing of IA (IAID: %1) from client %2 started.", + "DHCP6_DEPRECATED", "The following mechanism is now deprecated and will be removed in the future: %1", "DHCP6_DEVELOPMENT_VERSION", "This software is a development branch of Kea. It is not recommended for production use.", "DHCP6_DHCP4O6_PACKET_RECEIVED", "received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 port %3 on interface %4", "DHCP6_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1", diff --git a/src/bin/dhcp6/dhcp6_messages.h b/src/bin/dhcp6/dhcp6_messages.h index 5ec8aa1eed..8324384ae8 100644 --- a/src/bin/dhcp6/dhcp6_messages.h +++ b/src/bin/dhcp6/dhcp6_messages.h @@ -55,6 +55,7 @@ extern const isc::log::MessageID DHCP6_DECLINE_FAIL_LEASE_WITHOUT_DUID; extern const isc::log::MessageID DHCP6_DECLINE_FAIL_NO_LEASE; extern const isc::log::MessageID DHCP6_DECLINE_LEASE; extern const isc::log::MessageID DHCP6_DECLINE_PROCESS_IA; +extern const isc::log::MessageID DHCP6_DEPRECATED; extern const isc::log::MessageID DHCP6_DEVELOPMENT_VERSION; extern const isc::log::MessageID DHCP6_DHCP4O6_PACKET_RECEIVED; extern const isc::log::MessageID DHCP6_DHCP4O6_RECEIVE_FAIL; diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index bff59b33fc..2e0b395737 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -290,6 +290,11 @@ received in Decline message. It's expected that the option will contain an address that is being declined. Specific information will be printed in a separate message. +% DHCP6_DEPRECATED The following mechanism is now deprecated and will be removed in the future: %1 +The mechanism specified by parameter 1 is deprecated. It is functional, but +there is a plan to remove this capability in the future version. You +should plan your strategy to stop using it soon. + % DHCP6_DEVELOPMENT_VERSION This software is a development branch of Kea. It is not recommended for production use. This warning message is displayed when the version is a development (vs stable) one: the second number of the version is odd.