Skip to content

Commit

Permalink
SQUASH WIP fw rules
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Feb 28, 2025
1 parent 1556346 commit 95d5eaa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/detect-engine-sigorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,6 @@ void SCSigOrderSignatures(DetectEngineCtx *de_ctx)

Signature *sig = de_ctx->sig_list;
while (sig != NULL) {
SCLogNotice("sig %u", sig->id);

sigw = SCSigAllocSignatureWrapper(sig);
if (sig->init_data->firewall_rule) {
/* Push signature wrapper onto a list, order doesn't matter here. */
Expand All @@ -802,6 +800,9 @@ void SCSigOrderSignatures(DetectEngineCtx *de_ctx)
#endif
}

/* despite having Append in the name, the new Sig/Rule funcs actually prepend with some special
* logic around bidir sigs. So to respect the firewall rule order, we sort this part of the list
* by the add order. */
SCSigOrderFunc OrderFn = { .SWCompare = SCSigOrderByIIdCompare, .next = NULL };
fw_sigw_list = SCSigOrder(fw_sigw_list, &OrderFn);

Expand Down

0 comments on commit 95d5eaa

Please sign in to comment.