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

next/650/20241129/v1 #12185

Merged
merged 7 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
codecov:
require_ci_to_pass: false
notify:
after_n_builds: 3
after_n_builds: 5

coverage:
precision: 2
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1514,14 +1514,26 @@ jobs:
env:
LLVM_PROFILE_FILE: "/tmp/ut.profraw"
- run: llvm-profdata-14 merge -o ut.profdata /tmp/ut.profraw
- run: ./src/suricata --list-runmodes -l /tmp
env:
LLVM_PROFILE_FILE: "/tmp/listrunmodes.profraw"
- run: llvm-profdata-14 merge -o listrunmodes.profdata /tmp/listrunmodes.profraw
- run: ./src/suricata --list-keywords -l /tmp
env:
LLVM_PROFILE_FILE: "/tmp/lk.profraw"
- run: llvm-profdata-14 merge -o ut.profdata /tmp/lk.profraw
- run: llvm-profdata-14 merge -o lk.profdata /tmp/lk.profraw
- run: ./src/suricata --list-app-layer-protos -l /tmp
env:
LLVM_PROFILE_FILE: "/tmp/la.profraw"
- run: llvm-profdata-14 merge -o ut.profdata /tmp/la.profraw
- run: llvm-profdata-14 merge -o la.profdata /tmp/la.profraw
- run: ./src/suricata --dump-features -c suricata.yaml -l /tmp
env:
LLVM_PROFILE_FILE: "/tmp/dumpfeatures.profraw"
- run: llvm-profdata-14 merge -o dumpfeatures.profdata /tmp/dumpfeatures.profraw
- run: ./src/suricata --dump-config -c suricata.yaml -l /tmp
env:
LLVM_PROFILE_FILE: "/tmp/dumpconfig.profraw"
- run: llvm-profdata-14 merge -o dumpconfig.profdata /tmp/dumpconfig.profraw
- run: llvm-cov-14 show ./src/suricata -instr-profile=ut.profdata --show-instantiations --ignore-filename-regex="^/root/.*" > coverage.txt
- run: |
cd rust
Expand Down
117 changes: 41 additions & 76 deletions rust/Cargo.lock.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ crc = "~1.8.1"
lzma-rs = { version = "~0.2.0", features = ["stream"] }
memchr = "~2.4.1"
num = "~0.2.1"
num-derive = "~0.2.5"
num-derive = "~0.4.2"
num-traits = "~0.2.14"
widestring = "~0.4.3"
flate2 = "~1.0.19"
Expand Down
10 changes: 5 additions & 5 deletions rust/src/ldap/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub enum Filter {
ExtensibleMatch(MatchingRuleAssertion),
}

impl<'a> From<ldap_parser::filter::Filter<'a>> for Filter {
impl From<ldap_parser::filter::Filter<'_>> for Filter {
fn from(f: ldap_parser::filter::Filter) -> Self {
match f {
ldap_parser::filter::Filter::And(val) => {
Expand Down Expand Up @@ -123,7 +123,7 @@ pub struct PartialAttribute {
pub attr_vals: Vec<AttributeValue>,
}

impl<'a> From<&ldap_parser::filter::PartialAttribute<'a>> for PartialAttribute {
impl From<&ldap_parser::filter::PartialAttribute<'_>> for PartialAttribute {
fn from(value: &ldap_parser::filter::PartialAttribute) -> Self {
let attr_type = LdapString(value.attr_type.0.to_string());
let attr_vals: Vec<AttributeValue> = value
Expand All @@ -145,7 +145,7 @@ pub struct Attribute {
pub attr_vals: Vec<AttributeValue>,
}

impl<'a> From<&ldap_parser::filter::Attribute<'a>> for Attribute {
impl From<&ldap_parser::filter::Attribute<'_>> for Attribute {
fn from(value: &ldap_parser::filter::Attribute) -> Self {
let attr_type = LdapString(value.attr_type.0.to_string());
let attr_vals: Vec<AttributeValue> = value
Expand All @@ -166,7 +166,7 @@ pub struct AttributeValueAssertion {
pub attribute_desc: LdapString,
pub assertion_value: Vec<u8>,
}
impl<'a> From<&ldap_parser::filter::AttributeValueAssertion<'a>> for AttributeValueAssertion {
impl From<&ldap_parser::filter::AttributeValueAssertion<'_>> for AttributeValueAssertion {
fn from(value: &ldap_parser::filter::AttributeValueAssertion) -> Self {
let attribute_desc = LdapString(value.attribute_desc.0.to_string());
let assertion_value = value.assertion_value.to_vec();
Expand Down Expand Up @@ -203,7 +203,7 @@ pub enum Substring {
Any(AssertionValue),
Final(AssertionValue),
}
impl<'a> From<ldap_parser::filter::Substring<'a>> for Substring {
impl From<ldap_parser::filter::Substring<'_>> for Substring {
fn from(value: ldap_parser::filter::Substring) -> Self {
match value {
ldap_parser::filter::Substring::Initial(val) => {
Expand Down
2 changes: 1 addition & 1 deletion rust/src/ldap/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ pub struct Control {
pub control_value: Option<Vec<u8>>,
}

impl<'a> From<ldap_parser::ldap::LdapMessage<'a>> for LdapMessage {
impl From<ldap_parser::ldap::LdapMessage<'_>> for LdapMessage {
fn from(ldap_msg: ldap_parser::ldap::LdapMessage) -> Self {
let message_id = MessageID(ldap_msg.message_id.0);
let protocol_op = match ldap_msg.protocol_op {
Expand Down
7 changes: 7 additions & 0 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
// cf https://github.com/mozilla/cbindgen/issues/709
#![allow(unused_doc_comments)]

// Allow unknown lints, our MSRV doesn't know them all, for
// example static_mut_refs.
#![allow(unknown_lints)]

// Allow for now, but need to be fixed.
#![allow(static_mut_refs)]

#[macro_use]
extern crate bitflags;
extern crate byteorder;
Expand Down
Loading
Loading