Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(7.0.x backport) flow: Use proper thread id for injection #10738

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

jlucovsky
Copy link
Contributor

Continuation of #10708

Backport of issue 6835

Link to redmine ticket: 6863

Describe changes:

  • Also swap thread_ids when reversing a flow's direction
  • Never choose an uninitialized thread_id during injection

Updates:

  • Rebase

Provide values to any of the below to override the defaults.

To use a pull request use a branch name like pr/N where N is the
pull request number.

Alternatively, SV_BRANCH may also be a link to an
OISF/suricata-verify pull-request.

SV_REPO=
SV_BRANCH=
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=

Issue: 6835

When injecting a flow, ensure that the selected thread_id has been
initialized. When a flow is picked up midstream, the initialized thread
can be the second thread element.

(cherry picked from commit 9ad73fa)
Issue: 6835

When swapping the flow's direction, also swap the thread_ids.

This should help with the issues identified in
https://redmine.openinfosecfoundation.org/issues/2725

(cherry picked from commit 3c57459)
Copy link

codecov bot commented Mar 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.37%. Comparing base (80d2c6e) to head (158018f).

Additional details and impacted files
@@              Coverage Diff               @@
##           main-7.0.x   #10738      +/-   ##
==============================================
- Coverage       82.51%   82.37%   -0.15%     
==============================================
  Files             976      976              
  Lines          275061   275062       +1     
==============================================
- Hits           226979   226585     -394     
- Misses          48082    48477     +395     
Flag Coverage Δ
fuzzcorpus 63.52% <33.33%> (-0.30%) ⬇️
suricata-verify 61.65% <100.00%> (-0.03%) ⬇️
unittests 62.90% <33.33%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 19887

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good backport of #10650 minus the typo commit with clean cherry-picks

This was referenced Apr 5, 2024
@victorjulien victorjulien merged commit 158018f into OISF:main-7.0.x Apr 6, 2024
114 of 124 checks passed
@victorjulien
Copy link
Member

Merged in #10771, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants