From: Oleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) Date: Mon, 13 Mar 2023 07:58:20 +0000 (+0000) Subject: Pull request #3778: actions: restore rtn check in Actions::alert and add to Actions... X-Git-Tag: 3.1.58.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a31fc15eed48187cea24d90771af53cd9c5f64be;p=thirdparty%2Fsnort3.git Pull request #3778: actions: restore rtn check in Actions::alert and add to Actions::log Merge in SNORT/snort3 from ~ANOROKH/snort3:rtn_check to master Squashed commit of the following: commit d969e687476e4f6ca453fa0501691e93dd0b8442 Author: AnnaNorokh Date: Thu Mar 9 16:00:01 2023 +0200 actions: restore rtn check in Actions::alert and add to Actions::log --- diff --git a/src/actions/actions.cc b/src/actions/actions.cc index b516a838c..9320e8a59 100644 --- a/src/actions/actions.cc +++ b/src/actions/actions.cc @@ -22,8 +22,6 @@ #include "actions.h" -#include - #include "detection/detect.h" #include "managers/action_manager.h" #include "parser/parser.h" @@ -39,7 +37,9 @@ void Actions::pass() void Actions::log(Packet* p, const OptTreeNode* otn) { RuleTreeNode* rtn = getRtnFromOtn(otn); - assert(rtn); + if (!rtn) + return; + CallLogFuncs(p, otn, rtn->listhead); } @@ -49,7 +49,8 @@ void Actions::alert(Packet* p, const OptTreeNode* otn) return; RuleTreeNode* rtn = getRtnFromOtn(otn); - assert(rtn); + if (!rtn) + return; /* Call OptTreeNode specific output functions */ if (otn->outputFuncs)