From: Tomek Mrugalski Date: Tue, 23 Jul 2013 18:08:29 +0000 (+0200) Subject: [2984] skip in buffer6_receive not skips unpack procedure. X-Git-Tag: bind10-1.2.0beta1-release~284^2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b0906418973479e742cf831d5acdb291384014e;p=thirdparty%2Fkea.git [2984] skip in buffer6_receive not skips unpack procedure. --- diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 30aea8f925..c44a2e83c9 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -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());