From: Naveen Gujje (ngujje) Date: Wed, 31 Mar 2021 05:11:32 +0000 (+0000) Subject: Merge pull request #2816 in SNORT/snort3 from ~AJMANDAD/snort3:tracr_proto_bug to... X-Git-Tag: 3.1.4.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60d917fa5b4f28b83905a65abba00b97e603ab79;p=thirdparty%2Fsnort3.git Merge pull request #2816 in SNORT/snort3 from ~AJMANDAD/snort3:tracr_proto_bug to master Squashed commit of the following: commit 2d8674eb0608149257d1c908db5062829c98ca9e Author: Ajay Mandadi Date: Fri Mar 26 01:12:22 2021 -0400 packet_tracer: fix trace condition for setting IP_PROTO Signed-off-by: Ajay Mandadi --- diff --git a/src/network_inspectors/packet_tracer/packet_tracer_module.cc b/src/network_inspectors/packet_tracer/packet_tracer_module.cc index f8c6edad7..a8c8fc346 100644 --- a/src/network_inspectors/packet_tracer/packet_tracer_module.cc +++ b/src/network_inspectors/packet_tracer/packet_tracer_module.cc @@ -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;