]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2816 in SNORT/snort3 from ~AJMANDAD/snort3:tracr_proto_bug to...
authorNaveen Gujje (ngujje) <ngujje@cisco.com>
Wed, 31 Mar 2021 05:11:32 +0000 (05:11 +0000)
committerNaveen Gujje (ngujje) <ngujje@cisco.com>
Wed, 31 Mar 2021 05:11:32 +0000 (05:11 +0000)
Squashed commit of the following:

commit 2d8674eb0608149257d1c908db5062829c98ca9e
Author: Ajay Mandadi <ajmandad@cisco.com>
Date:   Fri Mar 26 01:12:22 2021 -0400

    packet_tracer: fix trace condition for setting IP_PROTO

Signed-off-by: Ajay Mandadi <ajmandad@cisco.com>
src/network_inspectors/packet_tracer/packet_tracer_module.cc

index f8c6edad791f9d09a3883473abc5a481f79df326..a8c8fc346554ddcd26eca7102338e520dda19bf3 100644 (file)
@@ -124,7 +124,7 @@ static int enable(lua_State* L)
 
     PacketConstraints constraints = {};
 
-    if (proto)
+    if (proto and (IpProtocol)proto < IpProtocol::PROTO_NOT_SET)
     {
         constraints.ip_proto = (IpProtocol)proto;
         constraints.set_bits |= PacketConstraints::SetBits::IP_PROTO;