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

Http range file v19 #6282

Closed
wants to merge 3 commits into from
Closed

Conversation

catenacyber
Copy link
Contributor

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/1576

Describe changes:

  • Uses a generic container (a thread-safe hash table whose key is the url/filename) to store file parts with HTTP Range header
  • handles reassembly of these parts, while enforcing a global memcap

suricata-verify-pr: 517
OISF/suricata-verify#517

Modifies #6273 with
Mostly fixing nbref that is removing nbred and using use_cnt instead
Taking care of other comments from code review (using red and black tree instead of linked list)

More testing of concurrency is always welcome
cf https://github.com/jasonish/suricata-http-range-test

Compares two buffers with their two sizes
adds a container, ie a thread safe hash table whose
key is the filename

keep a linked list 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
@catenacyber catenacyber requested a review from a team as a code owner July 30, 2021 15:24
@catenacyber catenacyber mentioned this pull request Jul 30, 2021
@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

Merging #6282 (9c9662f) into master (b8499de) will increase coverage by 0.02%.
The diff coverage is 72.98%.

@@            Coverage Diff             @@
##           master    #6282      +/-   ##
==========================================
+ Coverage   76.94%   76.97%   +0.02%     
==========================================
  Files         611      612       +1     
  Lines      186146   186586     +440     
==========================================
+ Hits       143236   143629     +393     
- Misses      42910    42957      +47     
Flag Coverage Δ
fuzzcorpus 52.90% <45.61%> (+0.08%) ⬆️
suricata-verify 51.35% <75.49%> (+0.19%) ⬆️
unittests 62.98% <3.19%> (-0.11%) ⬇️

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

@suricata-qa
Copy link

ERROR: SEGMENTATION FAULT in tlpr1_autofp_suri QA test

Pipeline 3663

@victorjulien victorjulien self-assigned this Aug 10, 2021
This was referenced Aug 12, 2021
@victorjulien
Copy link
Member

Continued in #6282

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.

3 participants