Merge in SNORT/snort3 from ~UMASHARM/snort3:CSCwq03149_Fix to master
Squashed commit of the following:
commit
b9a0565c730a042cd33dc42c3fc0b2c92a8c41a0
Author: Umang Sharma <umasharm@cisco.com>
Date: Wed Jul 23 11:44:21 2025 -0400
appid: getting packet from event than from detectionengine
using namespace snort;
-void AppIdServiceEventHandler::handle(DataEvent&, Flow* flow)
+void AppIdServiceEventHandler::handle(DataEvent& event, Flow* flow)
{
if (!pkt_thread_odp_ctxt or !flow)
return;
- Packet* p = DetectionEngine::get_current_packet();
+ const Packet* p = event.get_packet();
assert(p);
// FIXIT-E: For now, wait for snort service inspection only for TCP. In the future, if AppId
asd->flow = p->flow;
asd->stats.first_packet_second = p->pkth->ts.tv_sec;
asd->snort_protocol_id = asd->config.snort_proto_ids[PROTO_INDEX_UNSYNCHRONIZED];
- p->flow->set_flow_data(asd);
+
+ if (!p->flow)
+ APPID_LOG(CURRENT_PACKET, TRACE_ERROR_LEVEL,"flow is null, allocated appid session:%p\n", asd);
+ else
+ p->flow->set_flow_data(asd);
return asd;
}