86 const uint8_t default_action);
93 static inline uint8_t DetectRulePacketRules(
ThreadVars *
const tv,
127 DetectRunInspectIPOnly(th_v,
de_ctx, det_ctx, pflow, p);
130 DetectRunGetRuleGroup(
de_ctx, p, pflow, &scratch);
133 if (scratch.
sgh == NULL) {
134 SCLogDebug(
"no sgh for this packet, nothing to match against");
139 DetectRunPrefilterPkt(th_v,
de_ctx, det_ctx, p, &scratch);
143 const uint8_t pkt_policy = DetectRulePacketRules(th_v,
de_ctx, det_ctx, p, pflow, &scratch);
159 if (p->
proto == IPPROTO_TCP) {
162 DetectRunAppendDefaultAccept(det_ctx, p);
174 DetectRunFrames(th_v,
de_ctx, det_ctx, p, pflow, &scratch);
182 DetectRunAppendDefaultAccept(det_ctx, p);
185 }
else if (p->
proto == IPPROTO_UDP) {
186 DetectRunFrames(th_v,
de_ctx, det_ctx, p, pflow, &scratch);
190 DetectRunTx(th_v,
de_ctx, det_ctx, p, pflow, &scratch);
199 DetectRunAppendDefaultAccept(det_ctx, p);
203 DetectRunPostRules(th_v,
de_ctx, det_ctx, p, pflow, &scratch);
205 DetectRunCleanup(det_ctx, p, pflow);
229 if (scratch.
sgh == NULL) {
230 SCLogDebug(
"no sgh for this packet, nothing to match against");
235 DetectRunPrefilterPkt(th_v,
de_ctx, det_ctx, p, &scratch);
239 const uint8_t pkt_policy = DetectRulePacketRules(th_v,
de_ctx, det_ctx, p, pflow, &scratch);
246 DetectRunPostRules(th_v,
de_ctx, det_ctx, p, pflow, &scratch);
248 DetectRunCleanup(det_ctx, p, pflow);
261 SCLogDebug(
"running match functions, sm %p", smd);
298 }
else if (p->
proto == 0) {
299 if (!(PacketIsIPv4(p) || PacketIsIPv6(p))) {
308 int proto = PacketGetIPProto(p);
309 if (
proto == IPPROTO_TCP) {
313 const uint16_t port = dir ? p->
dp : p->
sp;
318 SCLogDebug(
"TCP list %p, port %u, direction %s, sghport %p, sgh %p", list, port,
319 dir ?
"toserver" :
"toclient", sghport, sgh);
320 }
else if (
proto == IPPROTO_UDP) {
322 uint16_t port = dir ? p->
dp : p->
sp;
326 SCLogDebug(
"UDP list %p, port %u, direction %s, sghport %p, sgh %p", list, port,
327 dir ?
"toserver" :
"toclient", sghport, sgh);
335 static inline void DetectPrefilterCopyDeDup(
343 while (final_cnt-- > 0) {
348 if (
likely(
id != previous_id)) {
365 DetectPostInspectFileFlagsUpdate(
Flow *f,
const SigGroupHead *sgh, uint8_t direction)
370 SCLogDebug(
"requesting disabling all file features for flow");
374 SCLogDebug(
"requesting disabling filestore for flow");
378 if (!(sgh->
flags & SIG_GROUP_HEAD_HAVEFILEMAGIC)) {
379 SCLogDebug(
"requesting disabling magic for flow");
384 SCLogDebug(
"requesting disabling md5 for flow");
388 SCLogDebug(
"requesting disabling sha1 for flow");
392 SCLogDebug(
"requesting disabling sha256 for flow");
396 if (flow_file_flags != 0) {
412 SCLogDebug(
"STREAMTCP_STREAM_FLAG_DISABLE_RAW ssn.client");
417 DetectPostInspectFileFlagsUpdate(pflow,
427 SCLogDebug(
"STREAMTCP_STREAM_FLAG_DISABLE_RAW ssn.server");
432 DetectPostInspectFileFlagsUpdate(pflow,
437 static inline void DetectRunGetRuleGroup(
445 bool use_flow_sgh =
false;
448 if (PacketGetIPProto(p) == pflow->
proto) {
452 SCLogDebug(
"sgh = pflow->sgh_toserver; => %p", sgh);
456 SCLogDebug(
"sgh = pflow->sgh_toclient; => %p", sgh);
462 if (!(use_flow_sgh)) {
475 DetectRunPostGetFirstRuleGroup(p, pflow, sgh);
495 SCLogDebug(
"testing against \"ip-only\" signatures");
514 static inline bool DetectRunInspectRuleHeader(
524 const bool fv = f->
flowvar != NULL;
526 SCLogDebug(
"skipping sig as the flow has no flowvars and sig "
527 "has SIG_FLAG_REQUIRE_FLOWVAR flag set.");
532 if (!(s->
proto == NULL)) {
533 const uint8_t s_proto_flags = s->
proto->
flags;
545 if (PacketIsEthernet(p) &&
579 SCLogDebug(
"port-less protocol and sig needs ports");
585 if (PacketIsIPv4(p)) {
588 }
else if (PacketIsIPv6(p)) {
595 if (PacketIsIPv4(p)) {
598 }
else if (PacketIsIPv6(p)) {
626 DetectPrefilterCopyDeDup(
de_ctx, det_ctx);
641 static bool IsOnlyTxInDirection(
Flow *f, uint64_t txid, uint8_t dir)
644 if (tx_cnt == txid + 1) {
648 if (tx_cnt == txid + 2) {
663 static int SortHelper(
const void *a,
const void *b)
669 return sa->
iid > sb->
iid ? 1 : -1;
672 static inline uint8_t DetectRulePacketRules(
ThreadVars *
const tv,
677 bool fw_verdict =
false;
697 bool skip_fw =
false;
698 uint32_t sflags, next_sflags = 0;
700 next_s = *match_array++;
701 next_sflags = next_s->
flags;
703 while (match_cnt--) {
705 bool break_out_of_packet_filter =
false;
706 uint8_t alert_flags = 0;
711 sflags = next_sflags;
713 next_s = *match_array++;
714 next_sflags = next_s->
flags;
726 }
else if (have_fw_rules) {
733 break_out_of_packet_filter =
true;
756 if (SigDsizePrefilter(p, s, sflags))
767 if (DetectRunInspectRuleHeader(p, pflow, s, sflags) ==
false) {
778 DetectRunPostMatch(
tv, det_ctx, p, s);
796 if (pflow->
proto != IPPROTO_UDP) {
813 SCLogDebug(
"sig_array_len %u det_ctx->pmq.rule_id_array_cnt %u",
816 for (uint32_t x = 0; x < match_cnt; x++) {
817 *r++ = match_array[x];
818 SCLogDebug(
"appended %u", match_array[x]->
id);
825 if (
ts->app_inspect == NULL) {
837 uint32_t skipped = 0;
838 for (uint32_t x = 0; x < match_cnt; x++) {
840 if (last_sig == *
m) {
847 match_cnt -= skipped;
849 next_s = *match_array++;
850 next_sflags = next_s->
flags;
881 break_out_of_packet_filter =
true;
886 break_out_of_packet_filter =
true;
897 break_out_of_packet_filter =
true;
901 DetectVarProcessList(det_ctx, pflow, p);
902 DetectReplaceFree(det_ctx);
906 if (break_out_of_packet_filter)
936 const uint8_t default_action)
939 uint8_t flow_flags = 0;
940 bool app_decoder_events =
false;
962 det_ctx->pkt_stream_add_cnt++;
971 flow_flags = STREAM_TOSERVER;
974 flow_flags = STREAM_TOCLIENT;
980 flow_flags |= STREAM_EOF;
1011 (p->
proto == IPPROTO_UDP) ||
1016 alproto = FlowGetAppProtocol(pflow);
1023 SCLogDebug(
"packet doesn't have established flag set (proto %d)", p->
proto);
1062 SCLogDebug(
"packet %" PRIu64
": droppit as no ACCEPT set %02x (pkt %s)",
1074 if (pflow != NULL) {
1091 FatalError(
"failed to allocate %" PRIu64
" bytes",
1095 SCLogDebug(
"array initialized to %u elements (%"PRIu64
" bytes)",
1107 const uint32_t need)
1118 uint32_t new_size = needed;
1121 FatalError(
"failed to expand to %" PRIu64
" bytes",
1127 SCLogDebug(
"array expanded from %u to %u elements (%"PRIu64
" bytes -> %"PRIu64
" bytes)",
1140 DetectRunTxSortHelper(
const void *a,
const void *b)
1144 if (s1->
id == s0->
id) {
1151 return s0->
id > s1->
id ? 1 : -1;
1155 #define TRACE_SID_TXS(sid,txs,...) \
1157 char _trace_buf[2048]; \
1158 snprintf(_trace_buf, sizeof(_trace_buf), __VA_ARGS__); \
1159 SCLogNotice("%p/%"PRIu64"/%u: %s", txs->tx_ptr, txs->tx_id, sid, _trace_buf); \
1162 #define TRACE_SID_TXS(sid,txs,...)
1171 tx_ptr = SCDoH2GetDnsTx(tx_ptr, flow_flags);
1176 }
else if (engine_alproto != alproto && engine_alproto !=
ALPROTO_UNKNOWN) {
1200 const uint8_t in_flow_flags,
1204 uint32_t *stored_flags,
1208 const uint8_t flow_flags = in_flow_flags;
1209 const int direction = (flow_flags & STREAM_TOSERVER) ? 0 : 1;
1210 uint32_t inspect_flags = stored_flags ? *stored_flags : 0;
1211 int total_matches = 0;
1212 uint16_t file_no_match = 0;
1213 bool retval =
false;
1214 bool mpm_before_progress =
false;
1215 bool mpm_in_progress =
false;
1217 TRACE_SID_TXS(s->
id, tx,
"starting %s", direction ?
"toclient" :
"toserver");
1220 if (
likely(stored_flags == NULL)) {
1222 if (DetectRunInspectRuleHeader(p, f, s, s->
flags) ==
false) {
1239 TRACE_SID_TXS(s->
id, tx,
"engine %p inspect_flags %x", engine, inspect_flags);
1242 if (!(inspect_flags &
BIT_U32(engine->
id)) &&
1246 if (tx_ptr == NULL) {
1250 engine = engine->
next;
1260 SCLogDebug(
"tx progress %d < engine progress %d",
1267 "engine->mpm: t->tx_progress %u > engine->progress %u, so set "
1268 "mpm_before_progress",
1270 mpm_before_progress =
true;
1273 "engine->mpm: t->tx_progress %u == engine->progress %u, so set "
1276 mpm_in_progress =
true;
1280 uint8_t engine_flags = flow_flags;
1281 if (direction != engine->
dir) {
1282 engine_flags = flow_flags ^ (STREAM_TOCLIENT | STREAM_TOSERVER);
1288 TRACE_SID_TXS(s->
id, tx,
"stream skipped, stored result %d used instead", match);
1293 mpm_before_progress =
true;
1307 de_ctx, det_ctx, engine, s, f, engine_flags, alstate, tx_ptr, tx->
tx_id);
1312 TRACE_SID_TXS(s->
id, tx,
"stream ran, store result %d for next tx (if any)", match);
1317 engine = engine->
next;
1324 engine = engine->
next;
1336 if (engine->
mpm && mpm_before_progress) {
1342 direction != engine->
dir) {
1346 if (direction == 0 && engine->
next == NULL) {
1350 engine = engine->
next;
1354 engine = engine->
next;
1355 }
while (engine != NULL);
1356 TRACE_SID_TXS(s->
id, tx,
"inspect_flags %x, total_matches %u, engine %p",
1357 inspect_flags, total_matches, engine);
1359 if (engine == NULL && total_matches) {
1366 *stored_flags = inspect_flags;
1367 TRACE_SID_TXS(s->
id, tx,
"continue inspect flags %08x", inspect_flags);
1374 if (file_no_match) {
1385 inspect_flags, flow_flags, file_no_match);
1389 "mpm won't trigger for it anymore");
1393 "we may have to revisit anyway");
1395 inspect_flags, flow_flags, file_no_match);
1399 "mpm will revisit it");
1400 }
else if (inspect_flags != 0 || file_no_match != 0) {
1403 inspect_flags, flow_flags, file_no_match);
1412 NULL, 0, NULL, NULL, 0, 0, 0, 0, \
1420 const uint64_t tx_id,
void *tx_ptr,
const int tx_end_state,
const uint8_t flow_flags)
1425 if (!updated && tx_progress < tx_end_state && ((flow_flags & STREAM_EOF) == 0)) {
1429 const uint8_t inspected_flag =
1432 SCLogDebug(
"%" PRIu64
" tx already fully inspected for %s. Flags %02x", tx_id,
1433 flow_flags & STREAM_TOSERVER ?
"toserver" :
"toclient", txd->
flags);
1440 SCLogDebug(
"%" PRIu64
" tx should not be inspected in direction %s. Flags %02x", tx_id,
1441 flow_flags & STREAM_TOSERVER ?
"toserver" :
"toclient", txd->
flags);
1446 const uint8_t detect_progress =
1449 const int dir_int = (flow_flags & STREAM_TOSERVER) ? 0 : 1;
1452 tx_de_state ? &tx_de_state->
dir_state[dir_int] : NULL;
1458 .detect_progress = detect_progress,
1459 .detect_progress_orig = detect_progress,
1460 .tx_progress = tx_progress,
1461 .tx_end_state = tx_end_state,
1466 static inline void StoreDetectProgress(
1470 if (flow_flags & STREAM_TOSERVER) {
1479 static inline void RuleMatchCandidateMergeStateRules(
1497 uint32_t j = *array_idx;
1506 uint32_t k = *array_idx;
1528 if (s->
iid <= s0->
id) {
1573 bool *skip_fw_hook,
const uint8_t skip_before_progress,
bool *last_for_progress,
1574 bool *fw_next_progress_missing)
1584 if (can_idx + 1 < can_size) {
1590 SCLogDebug(
"peek: next sid progress %u != current progress %u, so current "
1591 "is last for progress",
1593 *last_for_progress =
true;
1596 SCLogDebug(
"peek: missing progress, so we'll drop that unless we get a "
1597 "sweeping accept first");
1598 *fw_next_progress_missing =
true;
1602 SCLogDebug(
"peek: next sid not a fw rule, so current is last for progress");
1603 *last_for_progress =
true;
1606 SCLogDebug(
"peek: no peek beyond last rule");
1608 SCLogDebug(
"peek: there are no rules to allow the state after this rule");
1609 *fw_next_progress_missing =
true;
1613 if ((*skip_fw_hook) ==
true) {
1617 *skip_fw_hook =
false;
1649 static inline bool ApplyAcceptToPacket(
1663 if (total_txs == tx->
tx_id + 1) {
1671 if ((total_txs == tx->
tx_id + 1) &&
1681 static bool ApplyAccept(
Packet *p,
const uint8_t flow_flags,
const Signature *s,
1682 DetectTransaction *tx,
const int tx_end_state,
const bool fw_next_progress_missing,
1683 bool *tx_fw_verdict,
bool *skip_fw_hook, uint8_t *skip_before_progress)
1685 *tx_fw_verdict =
true;
1691 *skip_fw_hook =
true;
1696 if (fw_next_progress_missing) {
1698 flow_flags & STREAM_TOSERVER ?
"toserver" :
"toclient");
1706 *skip_fw_hook =
true;
1707 *skip_before_progress = (uint8_t)tx_end_state + 1;
1709 "accept:tx applied, skip_fw_hook, skip_before_progress %u", *skip_before_progress);
1726 const uint8_t flow_flags = scratch->
flow_flags;
1728 void *
const alstate = f->
alstate;
1729 const uint8_t ipproto = f->
proto;
1739 uint32_t fw_verdicted = 0;
1740 uint32_t tx_inspected = 0;
1751 GetDetectTx(ipproto, alproto, ires.
tx_id, ires.
tx_ptr, tx_end_state, flow_flags);
1753 SCLogDebug(
"%p/%"PRIu64
" no transaction to inspect",
1759 tx_id_min = tx.
tx_id + 1;
1768 bool do_sort =
false;
1769 uint32_t array_idx = 0;
1779 SCLogDebug(
"%p/%"PRIu64
" rules added from prefilter: %u candidates",
1783 if (!(RuleMatchCandidateTxArrayHasSpace(det_ctx, total_rules))) {
1784 RuleMatchCandidateTxArrayExpand(det_ctx, total_rules);
1798 if (!(RuleMatchCandidateTxArrayHasSpace(det_ctx, total_rules))) {
1799 RuleMatchCandidateTxArrayExpand(det_ctx, total_rules);
1805 uint32_t x = array_idx;
1807 RuleMatchCandidateMergeStateRules(det_ctx, &array_idx);
1811 const uint32_t old = array_idx;
1816 if (have_new_file) {
1817 SCLogDebug(
"%p/%"PRIu64
" destate: need to consider new file",
1824 for (; tx_store != NULL; tx_store = tx_store->
next) {
1830 store_cnt++, state_cnt++)
1847 do_sort |= (old && old != array_idx);
1853 DetectRunTxSortHelper);
1862 for (uint32_t i = 0; i < array_idx; i++) {
1868 bool skip_fw_hook =
false;
1869 uint8_t skip_before_progress = 0;
1870 bool fw_next_progress_missing =
false;
1878 if (total_txs == tx.
tx_id + 1) {
1879 DetectRunAppendDefaultAccept(det_ctx, p);
1885 bool tx_fw_verdict =
false;
1887 for (uint32_t i = 0; i < array_idx; i++) {
1891 bool break_out_of_app_filter =
false;
1894 flow_flags & STREAM_TOSERVER ?
"toserver" :
"toclient", tx.
tx_progress,
1902 while ((i + 1) < array_idx &&
1904 SCLogDebug(
"%p/%" PRIu64
" inspecting SKIP NEXT: sid %u (%u), flags %08x",
1913 if (!tx_fw_verdict) {
1914 const bool accept_tx_applies_to_packet = total_txs == tx.
tx_id + 1;
1915 if (accept_tx_applies_to_packet) {
1916 SCLogDebug(
"accept:(tx|hook): should be applied to the packet");
1917 DetectRunAppendDefaultAccept(det_ctx, p);
1920 tx_fw_verdict =
true;
1923 SCLogDebug(
"APP_LAYER_TX_ACCEPT, so skip rule");
1931 s->
id, s->
iid, inspect_flags ? *inspect_flags : 0);
1933 if (inspect_flags) {
1936 " inspecting: sid %u (%u), flags %08x DE_STATE_FLAG_FULL_INSPECT",
1943 const bool fw_accept_to_packet = ApplyAcceptToPacket(total_txs, &tx, s);
1944 break_out_of_app_filter = ApplyAccept(p, flow_flags, s, &tx, tx_end_state,
1945 fw_next_progress_missing, &tx_fw_verdict, &skip_fw_hook,
1946 &skip_before_progress);
1947 if (fw_accept_to_packet)
1948 DetectRunAppendDefaultAccept(det_ctx, p);
1949 if (break_out_of_app_filter)
1956 " inspecting: sid %u (%u), flags %08x DE_STATE_FLAG_SIG_CANT_MATCH",
1962 if (inspect_flags) {
1970 bool last_for_progress =
false;
1971 if (have_fw_rules) {
1972 int fw_r = DetectRunTxCheckFirewallPolicy(det_ctx, p, f, &tx, s, i, array_idx,
1973 &skip_fw_hook, skip_before_progress, &last_for_progress,
1974 &fw_next_progress_missing);
1983 const int r = DetectRunTxInspectRule(
tv,
de_ctx, det_ctx, p, f, flow_flags,
1984 alstate, &tx, s, inspect_flags, can, scratch);
1987 DetectRunPostMatch(
tv, det_ctx, p, s);
1992 const bool fw_accept_to_packet = ApplyAcceptToPacket(total_txs, &tx, s);
1995 if (fw_accept_to_packet) {
1996 SCLogDebug(
"accept:(tx|hook): should be applied to the packet");
2005 break_out_of_app_filter = ApplyAccept(p, flow_flags, s, &tx, tx_end_state,
2006 fw_next_progress_missing, &tx_fw_verdict, &skip_fw_hook,
2007 &skip_before_progress);
2009 }
else if (last_for_progress) {
2010 SCLogDebug(
"sid %u: not a match: %s rule, last_for_progress %s", s->
id,
2015 flow_flags & STREAM_TOSERVER ?
"toserver" :
"toclient");
2020 break_out_of_app_filter =
true;
2021 tx_fw_verdict =
true;
2024 DetectVarProcessList(det_ctx, p->
flow, p);
2033 uint32_t prev_array_idx = array_idx;
2036 if (
ts->app_inspect != NULL) {
2044 SCLogDebug(
"%p/%" PRIu64
" rule %u (%u) added from 'post match' prefilter",
2048 SCLogDebug(
"%p/%" PRIu64
" rules added from 'post match' prefilter: %u", tx.
tx_ptr,
2049 tx.
tx_id, array_idx - prev_array_idx);
2050 if (prev_array_idx != array_idx) {
2053 DetectRunTxSortHelper);
2059 if (break_out_of_app_filter)
2074 flow_flags & STREAM_TOSERVER ?
"toserver" :
"toclient");
2075 const uint8_t inspected_flag = (flow_flags & STREAM_TOSERVER)
2079 SCLogDebug(
"%p/%" PRIu64
" tx is done for direction %s. Progress %02x", tx.
tx_ptr,
2080 tx.
tx_id, flow_flags & STREAM_TOSERVER ?
"toserver" :
"toclient",
2104 tx_inspected, fw_verdicted);
2105 if (tx_inspected && have_fw_rules && tx_inspected != fw_verdicted) {
2107 flow_flags & STREAM_TOSERVER ?
"toserver" :
"toclient");
2113 if (tx_inspected == 0 && fw_verdicted == 0 && have_fw_rules) {
2114 DetectRunAppendDefaultAccept(det_ctx, p);
2129 SCLogDebug(
"pcap_cnt %" PRIu64
": %s: skip frame inspection for TCP w/o APP UPDATE",
2134 if (frames_container == NULL) {
2139 frames = &frames_container->
toserver;
2141 frames = &frames_container->
toclient;
2144 for (uint32_t idx = 0; idx < frames->
cnt; idx++) {
2147 if (frame == NULL) {
2152 uint32_t array_idx = 0;
2160 SCLogDebug(
"%p/%" PRIi64
" rules added from prefilter: %u candidates", frame, frame->
id,
2165 if (!(RuleMatchCandidateTxArrayHasSpace(
2166 det_ctx, total_rules))) {
2167 RuleMatchCandidateTxArrayExpand(det_ctx, total_rules);
2182 uint32_t x = array_idx;
2193 SCLogDebug(
"%p/%" PRIi64
" rule %u (%u) added from 'match' list", frame, frame->
id,
2197 SCLogDebug(
"%p/%" PRIi64
" rules added from 'match' list: %u", frame, frame->
id,
2202 for (uint32_t i = 0; i < array_idx; i++) {
2209 while ((i + 1) < array_idx &&
2213 SCLogDebug(
"%p/%" PRIi64
" inspecting: sid %u (%u)", frame, frame->
id, s->
id, s->
iid);
2216 SCLogDebug(
"%p/%" PRIi64
" Start sid %u", frame, frame->
id, s->
id);
2220 bool r = DetectRunInspectRuleHeader(p, f, s, s->
flags);
2225 DetectRunPostMatch(
tv, det_ctx, p, s);
2230 "%p/%" PRIi64
" sig %u (%u) matched", frame, frame->
id, s->
id, s->
iid);
2237 DetectVarProcessList(det_ctx, p->
flow, p);
2248 "frame->inspect_progress: %" PRIu64
" -> not updated", frame->
inspect_progress);
2251 SCLogDebug(
"%p/%" PRIi64
" rules inspected, running cleanup", frame, frame->
id);
2302 SCLogDebug(
"p->pcap %" PRIu64
": no detection on packet, "
2303 "PKT_NOPACKET_INSPECTION is set",
2332 DetectRunPacketHook(
tv,
de_ctx, det_ctx, sgh, p);
2343 DetectRunPacketHook(
tv,
de_ctx, det_ctx, sgh, p);
2361 if (det_ctx == NULL) {
2362 printf(
"ERROR: Detect has no thread ctx\n");
2368 SCLogDebug(
"Detect Engine using new det_ctx - %p",
2379 if (tenant_id > 0 && tenant_id < det_ctx->mt_det_ctxs_cnt) {
2382 if (det_ctx == NULL)
2390 SCLogDebug(
"MT de_ctx %p det_ctx %p (tenant %u)",
de_ctx, det_ctx, tenant_id);
2401 DetectFlow(
tv,
de_ctx, det_ctx, p);
2403 DetectNoFlow(
tv,
de_ctx, det_ctx, p);
2406 #ifdef PROFILE_RULES
2409 gettimeofday(&
ts, NULL);
2410 if (
ts.tv_sec != det_ctx->rule_perf_last_sync) {
2411 SCProfilingRuleThreatAggregate(det_ctx);
2412 det_ctx->rule_perf_last_sync =
ts.tv_sec;
2426 DetectPostInspectFileFlagsUpdate(f, NULL , STREAM_TOSERVER);
2427 DetectPostInspectFileFlagsUpdate(f, NULL , STREAM_TOCLIENT);
2438 DetectFlow(
tv,
de_ctx, det_ctx, p);
2440 DetectNoFlow(
tv,
de_ctx, det_ctx, p);