From: Steve Chew (stechew) Date: Tue, 20 Apr 2021 05:57:06 +0000 (+0000) Subject: Merge pull request #2851 in SNORT/snort3 from ~STECHEW/snort3:hold_packet_ip_frag... X-Git-Tag: 3.1.4.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca85f16709395fdf434be32f45c1eb64dfde25a6;p=thirdparty%2Fsnort3.git Merge pull request #2851 in SNORT/snort3 from ~STECHEW/snort3:hold_packet_ip_frag to master Squashed commit of the following: commit 8f56099ea176bcca27e743c632a4e2728f273e42 Author: Steve Chew Date: Mon Apr 19 13:41:45 2021 -0400 stream: IP frag packets won't have a flow so do not try to hold them. --- diff --git a/src/stream/stream.cc b/src/stream/stream.cc index 3b28f9d60..b56b2dcd2 100644 --- a/src/stream/stream.cc +++ b/src/stream/stream.cc @@ -796,6 +796,9 @@ uint8_t Stream::get_tcp_options_len(Flow* flow, bool to_server) bool Stream::set_packet_action_to_hold(Packet* p) { + if ( !p or !p->flow or !p->flow->session ) + return false; + return p->flow->session->set_packet_action_to_hold(p); }