From b3884de2e530ae3f54d9f95faee30c8c9fcbe4fd Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Fri, 2 Aug 2019 11:30:52 -0700 Subject: [PATCH] Fix how Broker/CAF sleep duration options are set With CAF 0.17.0, these are now reporting an incorrect option name was being used. --- CHANGES | 14 ++++++++++++++ VERSION | 2 +- src/broker/Manager.cc | 8 ++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index fa21c19b9f..6f1e35ba0c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,18 @@ +2.6-747 | 2019-08-02 11:30:52 -0700 + + * Fix how Broker/CAF sleep duration options are set (Jon Siwek, Corelight) + + * Add duration thresholding to the conn-size analyzer. (Johanna Amann, Corelight) + + Now, in addition to setting thresholds for bytes and packet, one can set + a threshold for connection duration. Note that the threshold event is + only raised once the next packet in the connection is seen. + + This also fixes a small pre-existing bug, in which a bunch of warnings + were raised if someone just used the lower-level functions without going + through the higher-level scripting API. + 2.6-744 | 2019-08-01 13:33:12 -0700 * Guarantee unique internal name for each lambda function diff --git a/VERSION b/VERSION index 915f58df09..69963f373b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6-744 +2.6-747 diff --git a/src/broker/Manager.cc b/src/broker/Manager.cc index 8225738b2e..e54ffa08a7 100644 --- a/src/broker/Manager.cc +++ b/src/broker/Manager.cc @@ -195,11 +195,11 @@ void Manager::InitPostScript() config.set("scheduler.max-threads", get_option("Broker::max_threads")->AsCount()); - config.set("work-stealing.moderate-sleep-duration-us", - static_cast(get_option("Broker::moderate_sleep")->AsInterval() / Microseconds)); + config.set("work-stealing.moderate-sleep-duration", caf::timespan( + static_cast(get_option("Broker::moderate_sleep")->AsInterval() * 1e9))); - config.set("work-stealing.relaxed-sleep-duration-us", - static_cast(get_option("Broker::relaxed_sleep")->AsInterval() / Microseconds)); + config.set("work-stealing.relaxed-sleep-duration", caf::timespan( + static_cast(get_option("Broker::relaxed_sleep")->AsInterval() * 1e9))); config.set("work-stealing.aggressive-poll-attempts", get_option("Broker::aggressive_polls")->AsCount());