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

Backports/60x/v3 #10885

Closed
wants to merge 7 commits into from
Closed

Conversation

victorjulien
Copy link
Member

SV_BRANCH=OISF/suricata-verify#1779

Backports for defrag/datalink issues.

Includes: #10875 and #10883

catenacyber and others added 7 commits April 17, 2024 12:58
Ticket: 6878

Follow up on 1564942

When adding many sequence nodes, either from start or scalar event

We add "sequence nodes" whose name is an integer cf sequence_node_name
and then run ConfNodeLookupChild to see if it had been already set
(from the command line cf comment in the code)
And ConfNodeLookupChild iterates the whole linked list...

1. We add node 1
2. To add node 2, we check if node 1 equals this new node
3. To add node 3, we check if nodes 1, or 2 equals this new node's name
And so on...

This commits avoids these checks ig the list is empty at the beginning

(cherry picked from commit 240e068)
Ticket: 6883

error: field `0` is never read
  --> src/asn1/mod.rs:36:14
   |
36 |     BerError(Err<der_parser::error::BerError>),
   |     -------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     field in this variant
   |

(cherry picked from commit 02f2fb8)
error: creating a mutable reference to mutable static is discouraged
   --> src/mqtt/mqtt.rs:752:23
    |
752 |     let max_msg_len = &mut MAX_MSG_LEN;
    |                       ^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <rust-lang/rust#114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
v4 was doing redundant recursion level setup.

v6 was missing PKT_REBUILT_FRAGMENT flag.

(cherry picked from commit af97316)
Eve's packet_info.linktype should correctly indicated what the `packet`
field contains. Until now it was using DLT_RAW even if Ethernet or other
L2+ headers were present.

This commit records the datalink of the packet creating the first
fragment, which can include the L2+ header data.

Bug: OISF#6887.
(cherry picked from commit 49c67b2)
This is just another variant of DLT_RAW.

Ticket: OISF#6943.
(cherry picked from commit 7632236)
When --enable-unittests w/o --enable-debug is used.

(cherry picked from commit e651cf9)
@victorjulien victorjulien requested review from jasonish and a team as code owners April 17, 2024 15:12
Copy link
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

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

Merge looks OK.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 20126

@victorjulien victorjulien mentioned this pull request Apr 18, 2024
@victorjulien
Copy link
Member Author

Replaced by #10888

@victorjulien victorjulien deleted the backports/60x/v3 branch June 23, 2024 07:23
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