]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4507] Fixed messages
authorFrancis Dupont <fdupont@isc.org>
Thu, 4 Jun 2026 15:33:47 +0000 (17:33 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 5 Jun 2026 07:43:45 +0000 (09:43 +0200)
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.h
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.h
src/bin/dhcp6/dhcp6_messages.mes

index 1e67ef0e19334f29e737771be0f85330c61a6fa6..2f44da197f929be8e6c3846d601202ca259ebd9f 100644 (file)
@@ -1931,11 +1931,13 @@ ControlledDhcpv4Srv::openSocketsFailedCallback(ReconnectCtlPtr reconnect_ctl) {
         return;
     }
 
-    LOG_INFO(dhcp4_logger, DHCP4_OPEN_SOCKETS_FAILED)
-            .arg(reconnect_ctl->maxRetries());
-
     if (reconnect_ctl->exitOnFailure()) {
+        LOG_FATAL(dhcp4_logger, DHCP4_FATAL_OPEN_SOCKETS_FAILED)
+            .arg(reconnect_ctl->maxRetries());
         shutdownServer(EXIT_FAILURE);
+    } else {
+        LOG_ERROR(dhcp4_logger, DHCP4_OPEN_SOCKETS_FAILED)
+            .arg(reconnect_ctl->maxRetries());
     }
 }
 
index 5046be2437c949701c23faaa015971eda8825721..04ea693e5a7a59aa948cbf00ab8aaf96ab1eaf19 100644 (file)
@@ -70,6 +70,7 @@ extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION = "DHCP4_DYNAMIC_
 extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION_FAIL = "DHCP4_DYNAMIC_RECONFIGURATION_FAIL";
 extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS = "DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS";
 extern const isc::log::MessageID DHCP4_EMPTY_HOSTNAME = "DHCP4_EMPTY_HOSTNAME";
+extern const isc::log::MessageID DHCP4_FATAL_OPEN_SOCKETS_FAILED = "DHCP4_FATAL_OPEN_SOCKETS_FAILED";
 extern const isc::log::MessageID DHCP4_FLEX_ID = "DHCP4_FLEX_ID";
 extern const isc::log::MessageID DHCP4_GENERATE_FQDN = "DHCP4_GENERATE_FQDN";
 extern const isc::log::MessageID DHCP4_HOOK_BUFFER_RCVD_DROP = "DHCP4_HOOK_BUFFER_RCVD_DROP";
@@ -253,6 +254,7 @@ const char* values[] = {
     "DHCP4_DYNAMIC_RECONFIGURATION_FAIL", "dynamic server reconfiguration failed with file: %1",
     "DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS", "dynamic server reconfiguration succeeded with file: %1",
     "DHCP4_EMPTY_HOSTNAME", "%1: received empty hostname from the client, skipping processing of this option",
+    "DHCP4_FATAL_OPEN_SOCKETS_FAILED", "maximum number of open service sockets attempts: %1, has been exhausted without success",
     "DHCP4_FLEX_ID", "%1: flexible identifier generated for incoming packet: %2",
     "DHCP4_GENERATE_FQDN", "%1: client did not send a FQDN or hostname; FQDN will be generated for the client",
     "DHCP4_HOOK_BUFFER_RCVD_DROP", "received buffer from %1 to %2 over interface %3 was dropped because a callout set the drop flag",
index 18472293e36245efbb2dedfe6fa26d4c92394b8c..a8799c4c9ae10c0687a67c2be2bc2e79a2fd3a44 100644 (file)
@@ -71,6 +71,7 @@ extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION;
 extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION_FAIL;
 extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS;
 extern const isc::log::MessageID DHCP4_EMPTY_HOSTNAME;
+extern const isc::log::MessageID DHCP4_FATAL_OPEN_SOCKETS_FAILED;
 extern const isc::log::MessageID DHCP4_FLEX_ID;
 extern const isc::log::MessageID DHCP4_GENERATE_FQDN;
 extern const isc::log::MessageID DHCP4_HOOK_BUFFER_RCVD_DROP;
index ed1e6759ff989d3909626983dff8ed6ae8ccf4b8..2bc011e76a5ab3f78729416ea42c4dde9b540ab7 100644 (file)
@@ -421,6 +421,11 @@ from a client. Server does not process empty Hostname options and therefore
 option is skipped. The argument holds the client and transaction identification
 information.
 
+% DHCP4_FATAL_OPEN_SOCKETS_FAILED maximum number of open service sockets attempts: %1, has been exhausted without success
+This error indicates that the server failed to bind service sockets after making
+the maximum configured number of open attempts. This causes the server
+to shut down as specified in the configuration.
+
 % DHCP4_FLEX_ID %1: flexible identifier generated for incoming packet: %2
 Logged at debug log level 40.
 This debug message is printed when host reservation type is set to flexible identifier
@@ -656,8 +661,7 @@ server is about to open sockets on the specified port.
 
 % DHCP4_OPEN_SOCKETS_FAILED maximum number of open service sockets attempts: %1, has been exhausted without success
 This error indicates that the server failed to bind service sockets after making
-the maximum configured number of reconnect attempts. This might cause the server
-to shut down as specified in the configuration.
+the maximum configured number of open attempts.
 
 % DHCP4_OPEN_SOCKETS_NO_RECONNECT_CTL unexpected error in bind service sockets.
 This is an error message indicating a programmatic error that should not occur.
index 188b6050fdcb5dec27ca587cb226c56de0d7fe22..1148b0be55764e4e7a9c879d3389a09b6f69b5c8 100644 (file)
@@ -1717,11 +1717,13 @@ ControlledDhcpv6Srv::openSocketsFailedCallback(ReconnectCtlPtr reconnect_ctl) {
         return;
     }
 
-    LOG_INFO(dhcp6_logger, DHCP6_OPEN_SOCKETS_FAILED)
-            .arg(reconnect_ctl->maxRetries());
-
     if (reconnect_ctl->exitOnFailure()) {
+        LOG_FATAL(dhcp6_logger, DHCP6_FATAL_OPEN_SOCKETS_FAILED)
+            .arg(reconnect_ctl->maxRetries());
         shutdownServer(EXIT_FAILURE);
+    } else {
+        LOG_ERROR(dhcp6_logger, DHCP6_OPEN_SOCKETS_FAILED)
+            .arg(reconnect_ctl->maxRetries());
     }
 }
 
index 5c0392a147773f3ecb7305c42431a827f5638c68..c140e4436dcaecb96768c056c579d260d0f0c8e6 100644 (file)
@@ -68,6 +68,7 @@ extern const isc::log::MessageID DHCP6_DHCP4O6_SEND_FAIL = "DHCP6_DHCP4O6_SEND_F
 extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION = "DHCP6_DYNAMIC_RECONFIGURATION";
 extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION_FAIL = "DHCP6_DYNAMIC_RECONFIGURATION_FAIL";
 extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS = "DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS";
+extern const isc::log::MessageID DHCP6_FATAL_OPEN_SOCKETS_FAILED = "DHCP6_FATAL_OPEN_SOCKETS_FAILED";
 extern const isc::log::MessageID DHCP6_FLEX_ID = "DHCP6_FLEX_ID";
 extern const isc::log::MessageID DHCP6_HOOK_ADDR6_REGISTER_DROP = "DHCP6_HOOK_ADDR6_REGISTER_DROP";
 extern const isc::log::MessageID DHCP6_HOOK_ADDR6_REGISTER_SKIP = "DHCP6_HOOK_ADDR6_REGISTER_SKIP";
@@ -248,6 +249,7 @@ const char* values[] = {
     "DHCP6_DYNAMIC_RECONFIGURATION", "initiate server reconfiguration using file: %1, after receiving SIGHUP signal or config-reload command",
     "DHCP6_DYNAMIC_RECONFIGURATION_FAIL", "dynamic server reconfiguration failed with file: %1",
     "DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS", "dynamic server reconfiguration succeeded with file: %1",
+    "DHCP6_FATAL_OPEN_SOCKETS_FAILED", "maximum number of open service sockets attempts: %1, has been exhausted without success",
     "DHCP6_FLEX_ID", "%1: flexible identifier generated for incoming packet: %2",
     "DHCP6_HOOK_ADDR6_REGISTER_DROP", "%1: ADDR-REG-INFORM for %2 is dropped, because a callout set the next step to DROP",
     "DHCP6_HOOK_ADDR6_REGISTER_SKIP", "%1: lease %2 operation for %3 is skipped, because a callout set the next step to SKIP",
index dabc13fca9c47951643bc030359526a1b91db4e7..3420f1b72d0383dbf4d3d2cd5fc1fdc075890b61 100644 (file)
@@ -69,6 +69,7 @@ extern const isc::log::MessageID DHCP6_DHCP4O6_SEND_FAIL;
 extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION;
 extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION_FAIL;
 extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS;
+extern const isc::log::MessageID DHCP6_FATAL_OPEN_SOCKETS_FAILED;
 extern const isc::log::MessageID DHCP6_FLEX_ID;
 extern const isc::log::MessageID DHCP6_HOOK_ADDR6_REGISTER_DROP;
 extern const isc::log::MessageID DHCP6_HOOK_ADDR6_REGISTER_SKIP;
index 27051e6d192250baa30f435a6cebca61c76c673e..319232859b3ccabf2607acbbd58e03fcb188c4e9 100644 (file)
@@ -397,6 +397,11 @@ DHCP server failed.
 This is info message logged when the dynamic reconfiguration of the DHCP server
 succeeded.
 
+% DHCP6_FATAL_OPEN_SOCKETS_FAILED maximum number of open service sockets attempts: %1, has been exhausted without success
+This error indicates that the server failed to bind service sockets after making
+the maximum configured number of open attempts. This causes the server
+to shut down as specified in the configuration.
+
 % DHCP6_FLEX_ID %1: flexible identifier generated for incoming packet: %2
 Logged at debug log level 40.
 This debug message is printed when host reservation type is set to flexible identifier
@@ -658,8 +663,7 @@ server is about to open sockets on the specified port.
 
 % DHCP6_OPEN_SOCKETS_FAILED maximum number of open service sockets attempts: %1, has been exhausted without success
 This error indicates that the server failed to bind service sockets after making
-the maximum configured number of reconnect attempts. This might cause the server
-to shut down as specified in the configuration.
+the maximum configured number of open attempts.
 
 % DHCP6_OPEN_SOCKETS_NO_RECONNECT_CTL unexpected error in bind service sockets.
 This is an error message indicating a programmatic error that should not occur.