From: Francis Dupont Date: Sat, 20 Feb 2016 13:15:17 +0000 (+0100) Subject: [4266] Cloned overloaded process packet got exception log message X-Git-Tag: trac4267_base~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08799aa82379fe4ba541dc33e6721b535faaf44a;p=thirdparty%2Fkea.git [4266] Cloned overloaded process packet got exception log message --- diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes index 09ab59e297..09eb033f91 100644 --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@ -449,10 +449,17 @@ This error message is issued when preparing an on-wire format of the packet has failed. The first argument identifies the client and the DHCP transaction. The second argument includes the error string. -% DHCP4_PACKET_PROCESS_EXCEPTION exception occurred during packet processing: %1 -This error message indicates that an exception was raised during packet processing -that was not caught by other, more specific exception handlers. This packet will -be dropped and the server will continue operation. +% DHCP4_PACKET_PROCESS_EXCEPTION exception occurred during packet processing +This error message indicates that a non-standard exception was raised +during packet processing that was not caught by other, more specific +exception handlers. This packet will be dropped and the server will +continue operation. + +% DHCP4_PACKET_PROCESS_STD_EXCEPTION exception occurred during packet processing: %1 +This error message indicates that a standard exception was raised +during packet processing that was not caught by other, more specific +exception handlers. This packet will be dropped and the server will +continue operation. % DHCP4_PACKET_RECEIVED %1: %2 (type %3) received from %4 to %5 on interface %6 A debug message noting that the server has received the specified type of diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 9ef1f55d75..c0ffcb9013 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -420,14 +420,13 @@ Dhcpv4Srv::run() { } catch (const std::exception& e) { // General catch-all exception that are not caught by more specific // catches. This one is for exceptions derived from std::exception. - LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_EXCEPTION) + LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_STD_EXCEPTION) .arg(e.what()); } catch (...) { // General catch-all exception that are not caught by more specific // catches. This one is for other exceptions, not derived from // std::exception. - LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_EXCEPTION) - .arg("an unknown exception not derived from std::exception"); + LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_EXCEPTION); } } diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index c79743b7c5..219c118a6a 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -417,16 +417,23 @@ because packets of this type must be sent to multicast. The first argument specifies the client and transaction identification information, the second argument specifies packet type. -% DHCP6_PACKET_PROCESS_EXCEPTION exception occurred during packet processing: %1 -This error message indicates that an exception was raised during packet processing -that was not caught by other, more specific exception handlers. This packet will -be dropped and the server will continue operation. +% DHCP6_PACKET_PROCESS_EXCEPTION exception occurred during packet processing +This error message indicates that a non-standard exception was raised +during packet processing that was not caught by other, more specific +exception handlers. This packet will be dropped and the server will +continue operation. % DHCP6_PACKET_PROCESS_FAIL processing of %1 message received from %2 failed: %3 This is a general catch-all message indicating that the processing of the specified packet type from the indicated address failed. The reason is given in the message. The server will not send a response but will instead ignore the packet. +% DHCP6_PACKET_PROCESS_STD_EXCEPTION exception occurred during packet processing: %1 +This error message indicates that a standard exception was raised +during packet processing that was not caught by other, more specific +exception handlers. This packet will be dropped and the server will +continue operation. + % DHCP6_PACKET_RECEIVED %1: %2 (type %3) received from %4 to %5 on interface %6 A debug message noting that the server has received the specified type of packet on the specified interface. The first argument specifies the diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 48a870c8ff..19ea4e39eb 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -293,13 +293,12 @@ bool Dhcpv6Srv::run() { } catch (const std::exception& e) { // General catch-all standard exceptions that are not caught by more // specific catches. - LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_EXCEPTION) + LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_STD_EXCEPTION) .arg(e.what()); } catch (...) { // General catch-all non-standard exception that are not caught // by more specific catches. - LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_EXCEPTION) - .arg("an unknown exception not derived from std::exception"); + LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_EXCEPTION); } }