From: Davis McPherson -X (davmcphe - XORIANT CORPORATION at Cisco) Date: Thu, 20 Jun 2024 15:11:23 +0000 (+0000) Subject: Pull request #4352: stream_tcp: set daq_msg field in meta-ack pseudo-packet header... X-Git-Tag: 3.3.1.0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fce7f4c970830f0ea049541c9a1c2fe81dc00338;p=thirdparty%2Fsnort3.git Pull request #4352: stream_tcp: set daq_msg field in meta-ack pseudo-packet header to the value from the wire packet. Merge in SNORT/snort3 from ~DAVMCPHE/snort3:meta_ack_daq_msg_init to master Squashed commit of the following: commit 63151959aaf66c274d277bd394b735f47007837e Author: davis mcpherson Date: Mon Jun 17 13:34:49 2024 -0400 stream_tcp: set daq_msg field in meta-ack pseudo-packet header to the value from the wire packet. --- diff --git a/src/stream/tcp/tcp_segment_descriptor.cc b/src/stream/tcp/tcp_segment_descriptor.cc index 23fc6c23e..5613d0808 100644 --- a/src/stream/tcp/tcp_segment_descriptor.cc +++ b/src/stream/tcp/tcp_segment_descriptor.cc @@ -92,6 +92,7 @@ TcpSegmentDescriptor::TcpSegmentDescriptor pkt->flow = p->flow; pkt->context = p->context; pkt->dsize = 0; + pkt->daq_msg = p->daq_msg; seq = tcph->seq(); ack = tcph->ack(); diff --git a/src/stream/tcp/tcp_session.cc b/src/stream/tcp/tcp_session.cc index 6c0efd45d..aa615790a 100644 --- a/src/stream/tcp/tcp_session.cc +++ b/src/stream/tcp/tcp_session.cc @@ -1165,6 +1165,8 @@ int TcpSession::process(Packet* p) if ( tcp_mack ) { TcpSegmentDescriptor ma_tsd(flow, p, tcp_mack->tcp_ack_seq_num, tcp_mack->tcp_window_size); + assert( ma_tsd.get_pkt()->daq_msg && ma_tsd.get_pkt()->daq_msg == p->daq_msg ); + init_tcp_packet_analysis(ma_tsd); process_tcp_packet(ma_tsd, p); tcpStats.meta_acks++;