Merge in SNORT/snort3 from ~ASERBENI/snort3:act_crash to master
Squashed commit of the following:
commit
2d65237dbeb6cdd1239964fd856b036d3cabc9a7
Author: Andrii Serbeniuk <aserbeni@cisco.com>
Date: Mon Oct 3 16:41:53 2022 +0300
actions: fix action logging for suppressed events
void AlertAction::exec(Packet* p, const OptTreeNode* otn)
{
- if ( otn )
- Actions::alert(p, otn);
+ Actions::alert(p, otn);
}
//-------------------------------------------------------------------------
{
p->active->block_session(p);
p->active->set_drop_reason("ips");
- if ( otn )
- Actions::alert(p, otn);
+
+ Actions::alert(p, otn);
}
//-------------------------------------------------------------------------
{
p->active->drop_packet(p);
p->active->set_drop_reason("ips");
- if ( otn )
- Actions::alert(p, otn);
+
+ Actions::alert(p, otn);
}
//-------------------------------------------------------------------------
{
p->active->drop_packet(p);
p->active->set_drop_reason("ips");
- if ( otn )
- Actions::alert(p, otn);
+
+ Actions::alert(p, otn);
}
//-------------------------------------------------------------------------
p->active->reset_again();
p->active->update_status(p);
- if ( otn )
- Actions::alert(p, otn);
+ Actions::alert(p, otn);
}
//-------------------------------------------------------------------------
void Actions::alert(Packet* p, const OptTreeNode* otn)
{
+ if (!otn)
+ return;
+
RuleTreeNode* rtn = getRtnFromOtn(otn);
assert(rtn);