From: Tomek Mrugalski Date: Mon, 7 Dec 2015 16:50:31 +0000 (+0100) Subject: [4206_0.9.2] fix for empty DUID in v6 X-Git-Tag: Kea-0.9.2-P1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e0bad9f425094dea85e48a45c62e4aa19649360;p=thirdparty%2Fkea.git [4206_0.9.2] fix for empty DUID in v6 --- diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index 5b62bb73bc..9b847970a0 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -413,6 +413,11 @@ 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_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_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 9f29e9d03f..33f54a01c4 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -314,6 +314,8 @@ bool Dhcpv6Srv::run() { Pkt6Ptr query; Pkt6Ptr rsp; + try { + try { // The lease database backend may install some timers for which // the handlers need to be executed periodically. Retrieve the @@ -710,6 +712,13 @@ bool Dhcpv6Srv::run() { .arg(e.what()); } } + + } catch (const std::exception& e) { + // General catch-all exception that are not caught by more specific + // catches. + LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_EXCEPTION) + .arg(e.what()); + } } return (true);