Draft: Ish/Staging/v1#9421
Conversation
|
What do you think about 45036b0 ? bit flags latest doc mentions to avoid zero bit flags cf https://docs.rs/bitflags/latest/bitflags/#zero-bit-flags |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #9421 +/- ##
==========================================
- Coverage 82.17% 82.13% -0.05%
==========================================
Files 968 968
Lines 274198 274228 +30
==========================================
- Hits 225331 225230 -101
- Misses 48867 48998 +131
Flags with carried forward coverage won't be shown. Click here to find out more. |
We should update and bring that fix in. Sorry, that commit arrived after plucking the clippy fixes from the PR. |
87be43b to
3172431
Compare
|
Information: QA ran without warnings. Pipeline 15781 |
Update the Bitflags crate to the latest supported version. This fixes
up a new clippy warning:
error: &-masking with zero
--> src/rdp/parser.rs:161:1
|
161 | / bitflags! {
162 | | pub struct ProtocolFlags: u32 {
163 | | const PROTOCOL_RDP = Protocol::ProtocolRdp as u32;
164 | | const PROTOCOL_SSL = Protocol::ProtocolSsl as u32;
... |
168 | | }
169 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
= note: `#[deny(clippy::bad_bit_mask)]` on by default
= note: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
When comparing IPv6 addresses based on uint32_t chunks, one needs to apply ntohl() conversion to the individual parts, otherwise on little endian systems individual bytes are compared in the wrong order. Avoid this all and leverage memcmp(), it'll short circuit on the first differing byte and its return values tells us which address sorts lower. Bug: OISF#6276
e467cfe to
ccefbd8
Compare
|
Information: QA ran without warnings. Pipeline 15784 |
|
NOTE: This PR may contain new authors: |
|
Information: QA ran without warnings. Pipeline 15802 |
|
Obsolete (and very messy), so closing. |
Staging:
SV_BRANCH=OISF/suricata-verify#1363