]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4206] Fix for empty DUID in v6
authorTomek Mrugalski <tomasz@isc.org>
Mon, 7 Dec 2015 16:48:28 +0000 (17:48 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Mon, 7 Dec 2015 16:48:28 +0000 (17:48 +0100)
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/dhcp6_srv.cc

index 8c5ca2cfb0bac866ec7dab377832c9d2e68c5ed9..66c27edf2bea5c1baa60a26cae6f508af420d1b1 100644 (file)
@@ -425,6 +425,11 @@ 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_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
index 0aaf4fe6e1c549c4809eb0f77cf312d508ca1642..2eaf423e2f916aab18b0c5e2cf4bb59e0d656dea 100644 (file)
@@ -300,6 +300,8 @@ bool Dhcpv6Srv::run() {
         Pkt6Ptr query;
         Pkt6Ptr rsp;
 
+        try {
+
         try {
             uint32_t timeout = 1000;
             LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_WAIT).arg(timeout);
@@ -693,6 +695,18 @@ bool Dhcpv6Srv::run() {
                     .arg(e.what());
             }
         }
+
+        } 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)
+                .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");
+        }
     }
 
     return (true);