From 1fdf3f644ecb8ba5b20d830176522fd78447a946 Mon Sep 17 00:00:00 2001 From: Jeff Lucovsky Date: Mon, 29 Jan 2024 13:39:40 -0500 Subject: [PATCH] napatech: Close streams on hard errors Issue: 5172 This commit forces the current stream to be closed when a hard error occurs. Without this commit, a hard error will force a 2nd connection the stream that raised the error. With this commit, the stream with the hard error is closed before opening another connection to the stream. Verified with the Python snippet in the redmine issue. --- src/source-napatech.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/source-napatech.c b/src/source-napatech.c index 54575d431e..7036178ad1 100644 --- a/src/source-napatech.c +++ b/src/source-napatech.c @@ -908,6 +908,7 @@ TmEcode NapatechPacketLoop(ThreadVars *tv, void *data, void *slot) NAPATECH_ERROR(status); SCLogInfo("Failed to read from Napatech Stream %d: %s", ntv->stream_id, error_buffer); + NapatechStreamThreadDeinit(tv, ntv); break; }