Skip to content

chore: upgrade pcapplusplus from 23.09 to 24.09#763

Open
leoparente wants to merge 5 commits intodevelopfrom
chore/update-linux-build
Open

chore: upgrade pcapplusplus from 23.09 to 24.09#763
leoparente wants to merge 5 commits intodevelopfrom
chore/update-linux-build

Conversation

@leoparente
Copy link
Copy Markdown
Contributor

@leoparente leoparente commented Mar 27, 2026

This pull request makes several important improvements and fixes to the DNS layer implementation, build system, and Conan integration. The main themes are: fixing a critical bug in DNS resource handling, improving Conan/CMake integration, updating dependencies, and modernizing header usage.

Summary of most important changes:

DNS Layer Bug Fixes and Modernization

  • Fixed a critical bug in the DNS resource linked list management by correcting all instances of the method name from setNexResource to the correct setNextResource in both header and implementation files, ensuring proper resource chaining and preventing potential runtime errors. [1] [2] [3] [4] [5] [6] [7]
  • Added a boundary check in DnsResource::getDataLength() to prevent heap buffer overflows when parsing DNS resource data, improving robustness against malformed packets.
  • Replaced traditional include guards with #pragma once in DNS-related headers for improved clarity and to prevent multiple inclusion issues. [1] [2] [3]
  • Modernized the DNS enums header (DnsLayerEnums.h) to re-export types from PcapPlusPlus, reducing code duplication and ensuring consistency with upstream definitions.

Conan and CMake Integration Improvements

  • Enhanced Conan integration in CMakeLists.txt and related CMake scripts to ensure Conan's toolchain file is loaded after the first find_package(), and improved logic for handling compiler executables, C++ standard detection, and multi-configuration builds. [1] [2] [3] [4] [5] [6] [7]
  • Updated Conan dependency for pcapplusplus from version 23.09 to 24.09 in conanfile.py, ensuring the project uses the latest features and fixes.

Minor Improvements

  • Made the constructor for DnsQuery that accepts raw data explicit to prevent unintended implicit conversions.
  • Removed obsolete or redundant include guards at the end of several headers, relying on #pragma once for header protection. [1] [2]

These changes collectively improve the reliability, maintainability, and modernity of the DNS layer code and its build system integration.

@leoparente leoparente self-assigned this Mar 27, 2026
@leoparente leoparente changed the title chore: update linux build chore: upgrade pcapplusplus from 23.09 to 24.09 Mar 27, 2026
@leoparente leoparente marked this pull request as ready for review March 27, 2026 20:38
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7283e5a207

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@leoparente
Copy link
Copy Markdown
Contributor Author

leoparente commented Mar 27, 2026

windows and MacOS builds are still broken. The plan is to fix them after every lib is properly upgraded.

@leoparente leoparente requested a review from weyrick March 27, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants