From: Jeff Lucovsky Date: Fri, 24 Apr 2020 14:28:32 +0000 (-0400) Subject: napatech: Check for out-of-band control operations X-Git-Tag: suricata-6.0.0-beta1~465 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f12adcc58cf5b79aec13609c672918f5279d4a7d;p=thirdparty%2Fsuricata.git napatech: Check for out-of-band control operations This commit causes the packet source to check for out of band control operations when there are no packets immediately available. --- diff --git a/src/source-napatech.c b/src/source-napatech.c index c944c8672c..f84482d5f2 100644 --- a/src/source-napatech.c +++ b/src/source-napatech.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2012-2017 Open Information Security Foundation +/* Copyright (C) 2012-2020 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -885,6 +885,9 @@ TmEcode NapatechPacketLoop(ThreadVars *tv, void *data, void *slot) status = NT_NetRxGet(ntv->rx_stream, &packet_buffer, 1000); if (unlikely( status == NT_STATUS_TIMEOUT || status == NT_STATUS_TRYAGAIN)) { + if (status == NT_STATUS_TIMEOUT) { + TmThreadsCaptureHandleTimeout(tv, ntv->slot, NULL); + } continue; } else if (unlikely(status != NT_SUCCESS)) { NAPATECH_ERROR(SC_ERR_NAPATECH_OPEN_FAILED, status);