From bb5fca506860a60ff0ed51aad3d8fcb4ebe5564e Mon Sep 17 00:00:00 2001 From: bheis Date: Fri, 19 May 2017 15:44:35 +0800 Subject: [PATCH] fixed: could not get un-closed tcp connection data in tcp_callback when read packet from pcap file --- nidsmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nidsmodule.c b/nidsmodule.c index 101bdd1..5b0b401 100644 --- a/nidsmodule.c +++ b/nidsmodule.c @@ -878,7 +878,8 @@ pynids_run(PyObject *na, PyObject *args) if (pynids_offline_read) { /* read until EOF, checking for exceptions along the way */ - do { r = nids_dispatch_exc(1); } while (r > 0); + //do { r = nids_dispatch_exc(1); } while (r > 0); + r = nids_run(); } else { /* read forever, checking for exceptions along the way */ do { r = nids_dispatch_exc(1); } while (r >= 0);