Skip to content

Rust fmt 3836 v10 - #15660

Closed
catenacyber wants to merge 2 commits into
OISF:mainfrom
catenacyber:rust-fmt-3836-v10
Closed

Rust fmt 3836 v10#15660
catenacyber wants to merge 2 commits into
OISF:mainfrom
catenacyber:rust-fmt-3836-v10

Conversation

@catenacyber

Copy link
Copy Markdown
Contributor

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

Describe changes:

  • rust: format smb files

Do not format the file smb_status.rs with its big list

#15645 next round

Still TODO the last one: base dir

@catenacyber
catenacyber requested review from a team, jasonish and victorjulien as code owners June 17, 2026 15:42
@catenacyber

Copy link
Copy Markdown
Contributor Author

base dir has a smaller diff than this one

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.95732% with 158 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.92%. Comparing base (097975e) to head (dd70b98).

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #15660    +/-   ##
========================================
  Coverage   82.91%   82.92%            
========================================
  Files        1006     1006            
  Lines      273690   274476   +786     
========================================
+ Hits       226942   227616   +674     
- Misses      46748    46860   +112     
Flag Coverage Δ
fuzzcorpus 61.52% <87.61%> (+0.12%) ⬆️
livemode 18.39% <0.00%> (-0.07%) ⬇️
netns 22.73% <0.00%> (-0.11%) ⬇️
pcap 45.32% <77.33%> (+0.10%) ⬆️
suricata-verify 66.77% <77.80%> (+0.05%) ⬆️
unittests 58.43% <6.40%> (-0.10%) ⬇️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@suricata-qa

Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 32087

Comment thread rust/src/smb/dcerpc.rs
let x = if dcer.little_endian {
vec![i.iface[3], i.iface[2], i.iface[1], i.iface[0],
i.iface[5], i.iface[4], i.iface[7], i.iface[6],
i.iface[8], i.iface[9], i.iface[10], i.iface[11],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wish this had a comment about why the initial bytes are specifically ordered, but then the later ones are just 8 to 11. Intentional? No idea :-/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it is intentional : uuids are strangely encoded :

When you have

5d2b62aa-ee0a-4a95-91ae-b064fdb471fc

On the wire, it shows up as

aa622b5d0aee954a91aeb064fdb471fc

See dcerpc-issue-7187-01/test.pcap

Comment on lines -97 to +108
let buff:&[u8] = &[
/* message type */ 0x00,
/* length */ 0x00, 0x00, 0x55,
/* data */ 0xff, 0x53, 0x4d, 0x42, 0x72, 0x00, 0x00, 0x00, 0x00,
0x98, 0x53, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x11, 0x05, 0x00, 0x03,
0x0a, 0x00, 0x01, 0x00, 0x04, 0x11, 0x00, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0xe3,
0x00, 0x80, 0x2a, 0x55, 0xc4, 0x38, 0x89, 0x03, 0xcd,
0x01, 0x2c, 0x01, 0x00, 0x10, 0x00, 0xfe, 0x82, 0xf1,
0x64, 0x0b, 0x66, 0xba, 0x4a, 0xbb, 0x81, 0xe1, 0xea,
0x54, 0xae, 0xb8, 0x66];
let buff: &[u8] = &[
/* message type */ 0x00, /* length */ 0x00, 0x00, 0x55, /* data */ 0xff,
0x53, 0x4d, 0x42, 0x72, 0x00, 0x00, 0x00, 0x00, 0x98, 0x53, 0xc8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x11, 0x05, 0x00, 0x03, 0x0a, 0x00, 0x01, 0x00, 0x04, 0x11, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0xe3, 0x00, 0x80, 0x2a,
0x55, 0xc4, 0x38, 0x89, 0x03, 0xcd, 0x01, 0x2c, 0x01, 0x00, 0x10, 0x00, 0xfe, 0x82,
0xf1, 0x64, 0x0b, 0x66, 0xba, 0x4a, 0xbb, 0x81, 0xe1, 0xea, 0x54, 0xae, 0xb8, 0x66,
];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe an ignore around this hand formatting for readability?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

guess if someone would really inspect it they'd reformat it? Was planning to approve and stage, but can hold off.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Its easy enough to "reverse" still.

@victorjulien victorjulien added this to the 9.0 milestone Jun 17, 2026
@victorjulien

Copy link
Copy Markdown
Member

Merged in #15663, thanks!

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.

4 participants