]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2851 in SNORT/snort3 from ~STECHEW/snort3:hold_packet_ip_frag...
authorSteve Chew (stechew) <stechew@cisco.com>
Tue, 20 Apr 2021 05:57:06 +0000 (05:57 +0000)
committerSteve Chew (stechew) <stechew@cisco.com>
Tue, 20 Apr 2021 05:57:06 +0000 (05:57 +0000)
Squashed commit of the following:

commit 8f56099ea176bcca27e743c632a4e2728f273e42
Author: Steve Chew <stechew@cisco.com>
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.

src/stream/stream.cc

index 3b28f9d60679f83f9d83ad7579bf8a799c084094..b56b2dcd2da9575845f8051cfc38c538aa571b88 100644 (file)
@@ -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);
 }