Merge in SNORT/snort3 from ~BSACHDEV/snort3:client_process_mapping to master
Squashed commit of the following:
commit
ce7051260b852b09a4a0a27d2375f90f2a0ea66d
Author: bsachdev <bsachdev@cisco.com>
Date: Tue Aug 16 14:41:36 2022 -0400
appid: Added a snort config to control client-process mapping
const std::string& user_agent = eve_process_event.get_user_agent();
std::vector<std::string> alpn_vec = eve_process_event.get_alpn();
const bool is_quic = eve_process_event.is_flow_quic();
+ const bool is_client_process_flag = eve_process_event.is_client_process_mapping();
AppidChangeBits change_bits;
snort_free(version);
}
- else if (!name.empty())
+ else if (!name.empty() and is_client_process_flag)
{
client_id = asd->get_odp_ctxt().get_eve_ca_matchers().match_eve_ca_pattern(name,
conf);
{
Packet p;
EveProcessEvent event(p, "firefox", 90);
+ event.set_client_process_mapping(true);
AppIdEveProcessEventHandler event_handler(dummy_appid_inspector);
Flow* flow = new Flow();
event_handler.handle(event, flow);
{
return is_quic;
}
+
+ bool is_client_process_mapping() const
+ {
+ return client_process_mapping;
+ }
+
+ void set_client_process_mapping(bool flag)
+ {
+ client_process_mapping = flag;
+ }
private:
const snort::Packet &p;
std::string user_agent;
std::vector<std::string> alpn;
bool is_quic = false;
+ bool client_process_mapping = true;
};
#endif