* service name.
*/
static void ServiceMapAddOtn(
- srmm_table_t* srmm, SnortProtocolId, const char* servicename, OptTreeNode* otn)
+ srmm_table_t* srmm, const char* servicename, OptTreeNode* otn)
{
assert(servicename and otn);
hashNode = sc->otn_map->find_next())
{
OptTreeNode* otn = (OptTreeNode*)hashNode->data;
- for (PolicyId policyId = 0;
- policyId < otn->proto_node_num;
- policyId++ )
+
+ // skip builtin rules
+ if ( otn->sigInfo.builtin )
+ continue;
+
+ /* Not enabled, don't do the FP content */
+ if ( !otn->enabled_somewhere() )
+ continue;
+
+ for ( const auto& svc : otn->sigInfo.services )
{
- RuleTreeNode* rtn = getRtnFromOtn(otn, policyId);
- if ( rtn )
- {
- // skip builtin rules
- if ( otn->sigInfo.builtin )
- continue;
-
- /* Not enabled, don't do the FP content */
- if ( !rtn->enabled() )
- continue;
-
- for ( const auto& svc : otn->sigInfo.services )
- {
- const char* s = svc.service.c_str();
- ServiceMapAddOtn(sc->srmmTable, rtn->snort_protocol_id, s, otn);
- }
- }
+ const char* s = svc.service.c_str();
+ ServiceMapAddOtn(sc->srmmTable, s, otn);
}
}
}
if ( flow->flow_state != Flow::FlowState::SETUP )
{
flow->set_direction(p);
+
// This call can reset the flow state to SETUP in lazy flow timeout cases
- flow->session->precheck(p);
+ if ( flow->flow_state != Flow::FlowState::ALLOW )
+ flow->session->precheck(p);
}
if ( flow->flow_state != Flow::FlowState::SETUP )