From b8e184ceb58821838235c58d437f57b382c41faf Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 5 Mar 2019 23:54:36 +0100 Subject: [PATCH] flow-bypass: fix timeout of maps bypassed flows The time is taken from the parameter and is checked against real flow entries so we need a standard time. --- src/flow-bypass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flow-bypass.c b/src/flow-bypass.c index 3debd48225..23bc8b99a7 100644 --- a/src/flow-bypass.c +++ b/src/flow-bypass.c @@ -63,7 +63,7 @@ static TmEcode BypassedFlowManager(ThreadVars *th_v, void *thread_data) BypassedFlowManagerThreadData *ftd = thread_data; struct timespec curtime = {0, 0}; - if (clock_gettime(CLOCK_MONOTONIC, &curtime) != 0) { + if (clock_gettime(CLOCK_REALTIME, &curtime) != 0) { SCLogWarning(SC_ERR_INVALID_VALUE, "Can't get time: %s (%d)", strerror(errno), errno); } @@ -75,7 +75,7 @@ static TmEcode BypassedFlowManager(ThreadVars *th_v, void *thread_data) while (1) { SCLogDebug("Dumping the table"); - if (clock_gettime(CLOCK_MONOTONIC, &curtime) != 0) { + if (clock_gettime(CLOCK_REALTIME, &curtime) != 0) { SCLogWarning(SC_ERR_INVALID_VALUE, "Can't get time: %s (%d)", strerror(errno), errno); usleep(10000);