From c7277e7654c0d8d0e7a4665373c0762c6e8a038d Mon Sep 17 00:00:00 2001 From: Mosder Date: Tue, 14 Jul 2026 13:40:17 +0200 Subject: fix: fixed not handling of different connections and bug regarding TCP SYN packet --- analyzer/analyzer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'analyzer/analyzer.c') diff --git a/analyzer/analyzer.c b/analyzer/analyzer.c index 03ecd2a..7def1e6 100644 --- a/analyzer/analyzer.c +++ b/analyzer/analyzer.c @@ -15,8 +15,8 @@ void analyzer_loop(TCPStream *stream, pcap_t *pcap_handle, void (*parsed_data_ha // get new segment TCPSegment segment = get_segment_from_packet(packet, packet_data); - // handle the new segment - if (handle_segment(stream, segment)) { + // handle the new segment if it's correct one and has data in it (ignore SYN) + if (segment.len > 0 && handle_segment(stream, segment)) { // if it was added to the stream - parse it size_t parsed_len; size_t n_parsed_data; -- cgit v1.2.3