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

Printable/v13 #9885

Closed
wants to merge 14 commits into from
Closed

Printable/v13 #9885

wants to merge 14 commits into from

Conversation

victorjulien
Copy link
Member

https://redmine.openinfosecfoundation.org/issues/6553

SV_BRANCH=OISF/suricata-verify#1493

replaces #9854

  • rebase
  • reimplement frame logging
  • membuffer cleanups
  • minor fixes and cleanups

Needed a workaround cast for RBTREE use.
Modeled after the same option in eve/alert. Defaults to 4k.
This avoids looping over partly duplicate segments that cause
output data corruption by logging parts of the stream data multiple
times.

For data with GAPs now add a indicator '[4 bytes missing]' similar
to how Wireshark does it.

Bug: OISF#6553.
Don't init buffer to 0 size but use the desired default of 4k.
In preparation of stream logging changes.
Log using stream callback API, meaning that data will also
be logged if there are GAPs.

Also implement GAP indicators: '[123 bytes missing]'.
For better readability and type checking.
ssn, stream, FrameJsonStreamDataCallback, &cbd, frame->offset, &unused, false);
/* if we have all data, but didn't log until the end of the frame, we have a gap at the
* end of the frame
* TODO what about not logging due to buffer full? */
Copy link
Member Author

Choose a reason for hiding this comment

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

could perhaps end with something like [3124 more bytes]

Copy link
Member Author

Choose a reason for hiding this comment

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

or simpler, just something like [...]

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Merging #9885 (8cdb514) into master (d005fff) will decrease coverage by 0.02%.
The diff coverage is 85.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9885      +/-   ##
==========================================
- Coverage   82.45%   82.43%   -0.02%     
==========================================
  Files         972      972              
  Lines      273057   273102      +45     
==========================================
- Hits       225156   225143      -13     
- Misses      47901    47959      +58     
Flag Coverage Δ
fuzzcorpus 64.35% <80.66%> (-0.02%) ⬇️
suricata-verify 61.10% <84.00%> (+0.01%) ⬆️
unittests 62.91% <0.66%> (-0.02%) ⬇️

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 16719

@victorjulien victorjulien mentioned this pull request Nov 27, 2023
@victorjulien
Copy link
Member Author

Replaced by #10261

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