|
|
|
|
@ -154,7 +154,7 @@ int PacketAlertCheck(Packet *p, uint32_t sid)
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static inline void RuleActionToFlow(const uint8_t action, Flow *f)
|
|
|
|
|
static inline void RuleActionToFlow(const uint8_t action, Flow *f, const bool fw_rule)
|
|
|
|
|
{
|
|
|
|
|
if (action & ACTION_ACCEPT) {
|
|
|
|
|
f->flags |= FLOW_ACTION_ACCEPT;
|
|
|
|
|
@ -187,6 +187,10 @@ static inline void RuleActionToFlow(const uint8_t action, Flow *f)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (fw_rule) {
|
|
|
|
|
f->flags |= FLOW_ACTION_BY_FIREWALL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** \brief Apply action(s) and Set 'drop' sig info,
|
|
|
|
|
@ -223,7 +227,7 @@ static void PacketApplySignatureActions(Packet *p, const Signature *s, const Pac
|
|
|
|
|
p->alerts.drop.s = (Signature *)s;
|
|
|
|
|
}
|
|
|
|
|
if ((p->flow != NULL) && (pa->flags & PACKET_ALERT_FLAG_APPLY_ACTION_TO_FLOW)) {
|
|
|
|
|
RuleActionToFlow(pa->action, p->flow);
|
|
|
|
|
RuleActionToFlow(pa->action, p->flow, is_fw_rule);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DEBUG_VALIDATE_BUG_ON(!PacketCheckAction(p, ACTION_DROP));
|
|
|
|
|
@ -248,7 +252,7 @@ static void PacketApplySignatureActions(Packet *p, const Signature *s, const Pac
|
|
|
|
|
|
|
|
|
|
if ((pa->action & (ACTION_PASS | ACTION_ACCEPT)) && (p->flow != NULL) &&
|
|
|
|
|
(pa->flags & PACKET_ALERT_FLAG_APPLY_ACTION_TO_FLOW)) {
|
|
|
|
|
RuleActionToFlow(pa->action, p->flow);
|
|
|
|
|
RuleActionToFlow(pa->action, p->flow, is_fw_rule);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|