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

rust/mqtt: create PDU frames prior to input parsing #10834

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glongo
Copy link
Contributor

@glongo glongo commented Apr 13, 2024

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

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

Describe changes:

  • Move PDU creation prior to input parsing

PDU frames are now created prior to input parsing to ensure that their
creation is independent of the parsing outcome.

Additionally, a minor style change has been applied by rustfmt.

Ticket OISF#6956
@glongo glongo requested a review from jasonish as a code owner April 13, 2024 14:28
Copy link

codecov bot commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.69%. Comparing base (365a66a) to head (92df5a1).
Report is 139 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10834      +/-   ##
==========================================
+ Coverage   82.67%   82.69%   +0.01%     
==========================================
  Files         928      928              
  Lines      247912   247922      +10     
==========================================
+ Hits       204952   205007      +55     
+ Misses      42960    42915      -45     
Flag Coverage Δ
fuzzcorpus 64.07% <100.00%> (+0.06%) ⬆️
suricata-verify 62.00% <100.00%> (+<0.01%) ⬆️
unittests 62.17% <0.00%> (-0.01%) ⬇️

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

@victorjulien
Copy link
Member

Do you happen to have a SV test for this?

@glongo
Copy link
Contributor Author

glongo commented Apr 15, 2024

Do you happen to have a SV test for this?

No, I don’t. However, there are already tests related to MQTT frames.

@catenacyber
Copy link
Contributor

I agree one SV test is needed to show the improvement over existing code.
IIRC, I had tried that and did not find a way to "see" the frame before its length was set (but Victor claimed it could).

@catenacyber catenacyber added the needs verify Needs (a) Suricata-verify test(s) label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs verify Needs (a) Suricata-verify test(s)
3 participants