-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Feature/http range/v30 #6409
Merged
victorjulien
merged 17 commits into
OISF:master
from
catenacyber:feature/http-range/v30
Sep 27, 2021
Merged
Feature/http range/v30 #6409
victorjulien
merged 17 commits into
OISF:master
from
catenacyber:feature/http-range/v30
Sep 27, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compares two buffers with their two sizes
adds a container, ie a thread safe hash table whose key is the filename keep a tree of unordered ranges, up to a memcap limit adds HTPFileOpenWithRange to handle like HTPFileOpen if there is a range : open 2 files, one for the whole reassembled, and one only for the current range
Simplify locking by using the THashData lock instead of a separate range lock. Avoid size_t in function arguments. Clean up file handling functions. Implement handling of alloc errors. Rename yaml entry to byterange Unify public api naming
Better structure design to ensure that one flow maximum is owning and appending into the file, adding fileOwning field. Adds also a gap field in a range buffer, so that we can feed the gap on closing, when we are protected from concurrency by a lock, (lock which got removed in the append path) Fixes memcap when encountering a duplicate while inserting in red and black tree Adds many comments
To make concurrency reasoning clearer
so that borrow check gets happy
for future compatibility with rust
A block is determined out of order on opening. But on closing, the gap before it may have been filled. So, we must post-process it, ie iterate over the red and black tree so see what blocks we can get.
Move the content-range parsing code to rust
catenacyber
requested review from
jasonish,
victorjulien and
a team
as code owners
September 24, 2021 13:23
Closed
Codecov Report
@@ Coverage Diff @@
## master #6409 +/- ##
==========================================
- Coverage 77.02% 76.99% -0.04%
==========================================
Files 612 613 +1
Lines 186105 186492 +387
==========================================
+ Hits 143353 143594 +241
- Misses 42752 42898 +146
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 4336 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 redmine ticket:
https://redmine.openinfosecfoundation.org/issues/1576
Describe changes:
suricata-verify-pr: 531
OISF/suricata-verify#531
Continues #6355 with comments taken into account
For testing : https://github.com/jasonish/suricata-http-range-test