From 5bb9a0c3af7c4b2635ddffbe62fc1bca9e007e69 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 7 Jan 2026 21:43:51 +0100 Subject: [PATCH] dcerpc/tcp: fix fragmentation handling Really count the fragments, and set it done when last was received --- rust/src/dcerpc/dcerpc.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/src/dcerpc/dcerpc.rs b/rust/src/dcerpc/dcerpc.rs index 1b0a55b9ed..92a1ed446f 100644 --- a/rust/src/dcerpc/dcerpc.rs +++ b/rust/src/dcerpc/dcerpc.rs @@ -645,8 +645,8 @@ impl DCERPCState { &mut tx.stub_data_buffer_ts, &mut tx.stub_data_buffer_reset_ts, ); - tx.req_done = true; - tx.frag_cnt_ts = 1; + tx.req_done = tx.stub_data_buffer_reset_ts; + tx.frag_cnt_ts += 1; if let Some(flow) = self.flow { sc_app_layer_parser_trigger_raw_stream_inspection(flow, Direction::ToServer as i32); } @@ -660,8 +660,8 @@ impl DCERPCState { &mut tx.stub_data_buffer_tc, &mut tx.stub_data_buffer_reset_tc, ); - tx.resp_done = true; - tx.frag_cnt_tc = 1; + tx.resp_done = tx.stub_data_buffer_reset_tc; + tx.frag_cnt_tc += 1; if let Some(flow) = self.flow { sc_app_layer_parser_trigger_raw_stream_inspection(flow, Direction::ToClient as i32); }