From: Francis Dupont Date: Mon, 10 Dec 2018 16:42:19 +0000 (+0100) Subject: [283-perfdhcp-fix-send-due] Fixed preload X-Git-Tag: 283-perfdhcp-sending-thread_base~5 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb5453a2193ed20b99ee2220ff66a508b7e3b783;p=thirdparty%2Fkea.git [283-perfdhcp-fix-send-due] Fixed preload --- diff --git a/src/bin/perfdhcp/test_control.cc b/src/bin/perfdhcp/test_control.cc index 9a302840d9..b92aee93b5 100644 --- a/src/bin/perfdhcp/test_control.cc +++ b/src/bin/perfdhcp/test_control.cc @@ -1678,7 +1678,9 @@ TestControl::saveFirstPacket(const Pkt6Ptr& pkt) { void TestControl::sendDiscover4(const TestControlSocket& socket, const bool preload /*= false*/) { - basic_rate_control_.updateSendTime(); + if (!preload) { + basic_rate_control_.updateSendTime(); + } // Generate the MAC address to be passed in the packet. uint8_t randomized = 0; std::vector mac_address = generateMacAddress(randomized); @@ -1729,7 +1731,9 @@ void TestControl::sendDiscover4(const TestControlSocket& socket, const std::vector& template_buf, const bool preload /* = false */) { - basic_rate_control_.updateSendTime(); + if (!preload) { + basic_rate_control_.updateSendTime(); + } // Get the first argument if multiple the same arguments specified // in the command line. First one refers to DISCOVER packets. const uint8_t arg_idx = 0; @@ -2203,7 +2207,9 @@ TestControl::sendRequest6(const TestControlSocket& socket, void TestControl::sendSolicit6(const TestControlSocket& socket, const bool preload /*= false*/) { - basic_rate_control_.updateSendTime(); + if (!preload) { + basic_rate_control_.updateSendTime(); + } // Generate DUID to be passed to the packet uint8_t randomized = 0; std::vector duid = generateDuid(randomized); @@ -2256,7 +2262,9 @@ void TestControl::sendSolicit6(const TestControlSocket& socket, const std::vector& template_buf, const bool preload /*= false*/) { - basic_rate_control_.updateSendTime(); + if (!preload) { + basic_rate_control_.updateSendTime(); + } const int arg_idx = 0; // Get transaction id offset. size_t transid_offset = getTransactionIdOffset(arg_idx);