diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2018-06-14 18:36:41 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-06-17 12:07:11 +0000 |
commit | a0dfa8b158e327303fccc1f93bf05e948c93e93c (patch) | |
tree | 812528da3b0d50b662fa987b6db4f4a89479d81f /src | |
parent | e0b6c8a96d6d3fce583d0ef4b851a50a74afba5d (diff) |
acl-plugin: fix the high cpu usage caused by the connection cleaner
The commit 4bc1796b346efd10f3fb19b176ff089179263a24 had incorrect
calculation of the session lists minimal timeout, resulting
in returned value of 0 which resulted in existing sessions
constantly requeued, taking up the CPU. Fix this calculation.
Change-Id: I9a789739f96a1f01522c68f91b0a02db2417837f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/acl/sess_mgmt_node.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/acl/sess_mgmt_node.c b/src/plugins/acl/sess_mgmt_node.c index bfc357f667f..abb1e7cf0e4 100644 --- a/src/plugins/acl/sess_mgmt_node.c +++ b/src/plugins/acl/sess_mgmt_node.c @@ -38,7 +38,8 @@ fa_session_get_shortest_timeout (acl_main_t * am) { int timeout_type; u64 timeout = ~0LL; - for (timeout_type = 0; timeout_type <= ACL_N_USER_TIMEOUTS; timeout_type++) + for (timeout_type = ACL_TIMEOUT_UDP_IDLE; + timeout_type < ACL_N_USER_TIMEOUTS; timeout_type++) { if (timeout > am->session_timeout_sec[timeout_type]) { |