Skip to content

Conversation

@catenacyber
Copy link
Contributor

@catenacyber catenacyber commented Jul 7, 2022

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

Describe changes:

  • Rework includes as per cppclean

Still to do : add cppclean as part of CI, so that means having a reproducible cleaner script

I used this patched version myint/cppclean#165

There are still exceptions :

  • About Suricata : When "rust.h" or "suricata-common.h" gets included, and when includes is rust.h or rust-context.h
  • About cppclean
    • when using macros such as TAILQ with including queue.h (or red and black tree)
    • when using the array size, such as ``uint8_t plugin_v[PLUGIN_VAR_SIZE]; in decode.h needing suricata-plugin.h
    • when using #define a(x) b(x) where b is in another file cf SpmSearch
      The result is less includes from header file to another, nothing is done for C files including a useless header

Modifies #7570 with rebase and dummy commit to check if it passes CI

This PR adds about one hundred lines #include "detect-engine-build.h" because it is being used in util tests for SigGroupBuild and such... Any thoughts on that ?

@catenacyber catenacyber mentioned this pull request Jul 7, 2022
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #7618 (c53e0fc) into master (a2f857e) will decrease coverage by 0.00%.
The diff coverage is n/a.

❗ Current head c53e0fc differs from pull request most recent head dc7f061. Consider uploading reports for the commit dc7f061 to get more accurate results

@@            Coverage Diff             @@
##           master    #7618      +/-   ##
==========================================
- Coverage   75.73%   75.72%   -0.01%     
==========================================
  Files         659      659              
  Lines      185740   185740              
==========================================
- Hits       140669   140657      -12     
- Misses      45071    45083      +12     
Flag Coverage Δ
fuzzcorpus 59.85% <ø> (+<0.01%) ⬆️
suricata-verify 52.41% <ø> (-0.03%) ⬇️
unittests 60.71% <ø> (+<0.01%) ⬆️

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

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 8149

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 8150

@catenacyber
Copy link
Contributor Author

Replaced by #7643

victorjulien added a commit to victorjulien/suricata that referenced this pull request Mar 19, 2025
Avoids setting a 0 snaplen in BPF, leading to an error.

Fixes: b8b6ed5 ("af-packet: delay setting default-packet-size for af-packet")

Ticket: OISF#7618.
victorjulien added a commit to victorjulien/suricata that referenced this pull request Mar 19, 2025
Avoids setting a 0 snaplen in BPF, leading to an error.

Fixes: b8b6ed5 ("af-packet: delay setting default-packet-size for af-packet")

Ticket: OISF#7618.
victorjulien added a commit to victorjulien/suricata that referenced this pull request Mar 19, 2025
Avoids setting a 0 snaplen in BPF, leading to an error.

Fixes: b8b6ed5 ("af-packet: delay setting default-packet-size for af-packet")

Ticket: OISF#7618.
(cherry picked from commit faaff6f)
victorjulien added a commit to victorjulien/suricata that referenced this pull request Mar 19, 2025
Avoids setting a 0 snaplen in BPF, leading to an error.

Fixes: b8b6ed5 ("af-packet: delay setting default-packet-size for af-packet")

Ticket: OISF#7618.
(cherry picked from commit 749ffbd)
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.

2 participants