From: Francis Dupont Date: Thu, 4 Jun 2026 15:33:47 +0000 (+0200) Subject: [#4507] Fixed messages X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=9f30f6b4e2a044382dac587c8bd3ee12a71706ff;p=thirdparty%2Fkea.git [#4507] Fixed messages --- diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc index 1e67ef0e19..2f44da197f 100644 --- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc +++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc @@ -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()); } } diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc index 5046be2437..04ea693e5a 100644 --- a/src/bin/dhcp4/dhcp4_messages.cc +++ b/src/bin/dhcp4/dhcp4_messages.cc @@ -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", diff --git a/src/bin/dhcp4/dhcp4_messages.h b/src/bin/dhcp4/dhcp4_messages.h index 18472293e3..a8799c4c9a 100644 --- a/src/bin/dhcp4/dhcp4_messages.h +++ b/src/bin/dhcp4/dhcp4_messages.h @@ -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; diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes index ed1e6759ff..2bc011e76a 100644 --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@ -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. diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc index 188b6050fd..1148b0be55 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc @@ -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()); } } diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc index 5c0392a147..c140e4436d 100644 --- a/src/bin/dhcp6/dhcp6_messages.cc +++ b/src/bin/dhcp6/dhcp6_messages.cc @@ -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", diff --git a/src/bin/dhcp6/dhcp6_messages.h b/src/bin/dhcp6/dhcp6_messages.h index dabc13fca9..3420f1b72d 100644 --- a/src/bin/dhcp6/dhcp6_messages.h +++ b/src/bin/dhcp6/dhcp6_messages.h @@ -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; diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index 27051e6d19..319232859b 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -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.