detect: factorize code for DetectSetupDirection #13120
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7665
Describe changes:
This means adding facility to allow non-sticky buffer keywords
DetectSetupDirection
call site toSigParseOptions
instead of in each keyword and use a new flagSIGMATCH_SUPPORT_DIR
DetectSetupDirection
now takes a pointer to a string, and may move the string forward to allowfilesize: to_client, >100;
so thatDetectFilesizeSetup
gets called with ">100"SigMatchAppendSMToList
now setsonly_tc
andonly_ts
asDetectBufferSetActiveList
already does(3 commits may be better but debugging, I ended up squashing everything)
Now making transactional rules support other direction-ambiguous keywords should be one-liner like adding
SIGMATCH_SUPPORT_DIR
tosigmatch_table[DETECT_KEYWORD].flags
SV_BRANCH=OISF/suricata-verify#2453
#13046 with needed rebase and unit tests for
DetectSetupDirection
and better behavior