Squashed commit of the following:
commit
72c8a3dc6e826e107e11ff901c9d14f6bb9f5ed2
Author: Michael Matirko <mmatirko@cisco.com>
Date: Thu May 13 12:07:52 2021 -0400
reputation: track monitor ID via flow; minor code cleanup
if (enc.flags & ENC_FLAG_INLINE)
{
uint32_t seq = 0;
-
+
if(Stream::get_held_pkt_seq(flow, seq))
tcph_out->th_seq = htonl(seq);
else
unsigned network_policy_id;
unsigned reload_id;
+ uint32_t iplist_monitor_id;
+
uint32_t default_session_timeout;
int32_t client_intf;
void Module::reset_stats()
{
PegCount* p = get_counts();
-
+
if ( !p )
return;
if ( !pi || !pi->framework_policy )
return nullptr;
-
+
auto g = pi->framework_policy->inspector_cache_by_id.find(protocol_id);
return (g != pi->framework_policy->inspector_cache_by_id.end()) ? g->second : nullptr;
}
lock_guard<mutex> lock(stats_mutex);
mh->mod->reset_stats();
}
-
}
else
- {
+ {
auto mod_hooks = get_all_modhooks();
for ( auto* mh : mod_hooks )
{
else if (decision == MONITORED)
{
if (p->flow)
+ {
p->flow->flags.reputation_monitor = true;
+ p->flow->iplist_monitor_id = p->iplist_id;
+ }
DetectionEngine::queue_event(GID_REPUTATION, REPUTATION_EVENT_MONITOR_DST);
reputationstats.aux_ip_monitored++;
int smb_com = SmbCom(smb_hdr);
if (smb_com < 0 or smb_com > 255) return nullptr;
-
+
debug_logf(dce_smb_trace, DetectionEngine::get_current_packet(),
"SMB command: %s (0x%02X)\n", get_smb_com_string(smb_com), smb_com);