]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2984] skip in buffer6_receive not skips unpack procedure.
authorTomek Mrugalski <tomasz@isc.org>
Tue, 23 Jul 2013 18:08:29 +0000 (20:08 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 23 Jul 2013 18:08:29 +0000 (20:08 +0200)
src/bin/dhcp6/dhcp6_srv.cc

index 30aea8f9251b89caca5e2b3acf1d5ff454aef346..c44a2e83c92e54f4ecb82a61aac833f0f4855f9b 100644 (file)
@@ -197,6 +197,8 @@ bool Dhcpv6Srv::run() {
             continue;
         }
 
+        bool skip_unpack = false;
+
         // Let's execute all callouts registered for buffer6_receive
         if (HooksManager::getHooksManager().calloutsPresent(Hooks.hook_index_buffer6_receive_)) {
             CalloutHandlePtr callout_handle = getCalloutHandle(query);
@@ -215,16 +217,18 @@ bool Dhcpv6Srv::run() {
             // stage means drop.
             if (callout_handle->getSkip()) {
                 LOG_DEBUG(dhcp6_logger, DBG_DHCP6_HOOKS, DHCP6_HOOK_BUFFER_RCVD_SKIP);
-                continue;
+                skip_unpack = true;
             }
 
             callout_handle->getArgument("query6", query);
         }
 
-        if (!query->unpack()) {
-            LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL,
-                      DHCP6_PACKET_PARSE_FAIL);
-            continue;
+        if (!skip_unpack) {
+            if (!query->unpack()) {
+                LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL,
+                          DHCP6_PACKET_PARSE_FAIL);
+                continue;
+            }
         }
         LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, DHCP6_PACKET_RECEIVED)
             .arg(query->getName());