suricata icon indicating copy to clipboard operation
suricata copied to clipboard

defrag: remove unnecessary copy operations

Open shizishizi2012 opened this issue 3 years ago • 4 comments

Make sure these boxes are signed before submitting your Pull Request -- thank you.

  • [x] I have read the contributing guide lines at https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Contributing
  • [x] I have signed the Open Information Security Foundation contribution agreement at https://suricata-ids.org/about/contribution-agreement/
  • [x] I have updated the user guide (in doc/userguide/) to reflect the changes made (if applicable)

Link to redmine ticket: No

Describe changes:

  • When reassembling the IPv6 fragment, there is no need to copy the last fragment data to the new packet. Fixing that.

#suricata-verify-pr: #suricata-verify-repo: #suricata-verify-branch: #suricata-update-pr: #suricata-update-repo: #suricata-update-branch: #libhtp-pr: #libhtp-repo: #libhtp-branch:

shizishizi2012 avatar Jul 02 '21 06:07 shizishizi2012

Codecov Report

Merging #6246 (621fac4) into master (b8499de) will decrease coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #6246      +/-   ##
==========================================
- Coverage   76.94%   76.93%   -0.02%     
==========================================
  Files         611      611              
  Lines      186146   186145       -1     
==========================================
- Hits       143236   143214      -22     
- Misses      42910    42931      +21     
Flag Coverage Δ
fuzzcorpus 52.84% <100.00%> (+0.02%) :arrow_up:
suricata-verify 51.09% <0.00%> (-0.06%) :arrow_down:
unittests 63.08% <100.00%> (-0.01%) :arrow_down:

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

codecov[bot] avatar Jul 02 '21 08:07 codecov[bot]

Thanks @shizishizi2012. Can you please elaborate in the git commit why they copy is not needed? Thanks!

jasonish avatar Jul 02 '21 14:07 jasonish

Thanks @shizishizi2012. Can you please elaborate in the git commit why they copy is not needed? Thanks!

The content of they copy will be covered by the IP fragment of the subsequent circular copy.

shizishizi2012 avatar Jul 03 '21 07:07 shizishizi2012

@shizishizi2012 are you planning further work on this ?

catenacyber avatar Jul 06 '22 13:07 catenacyber