Repository navigation
Conversation
The QUIC process plugin is the only part of ipfixprobe that uses OpenSSL (to decrypt QUIC Initial packets), but it is always built, so OpenSSL is a hard build and runtime dependency of the whole project. Adds an `ENABLE_PROCESS_QUIC` option (default ON, so the default build is unchanged) and look up OpenSSL only when the plugin is enabled. This allows building ipfixprobe for small embedded devices without OpenSSL.
The UniRec field generator was always run from /usr/bin/nemea/ur_processor.sh on the build host. In cross builds (e.g. OpenWrt) the script is staged elsewhere and the build host may not have Nemea installed at all. Look the script up with find_program(), keeping /usr/bin/nemea as a search path, so that the location can be overridden with -DUR_PROCESSOR=<path>.
On 32-bit targets size_t is not the same type as uint64_t or unsigned long, which breaks the build in two places: - tlsParser: quic_get_variable_length() takes the offset as uint64_t&, but parse_quic_user_agent() passes a size_t, so the reference cannot bind. Declares the offset as uint64_t. - tls: std::min() is called with a size_t and an unsigned long literal, so template argument deduction fails. Uses std::min<size_t> instead.
fill_unirec() allocates the QUIC_TLS_EXT_TYPE array instead of the TLS_EXT_TYPE array that it fills afterwards. The allocation fails, because the field is not part of the TLS template, and the array is then grown by ur_array_set() one element at a time, which moves the rest of the record on every element. Allocates the TLS_EXT_TYPE array instead. The exported data does not change.
editorconfig-checker 4.0.0 renamed its binary from `ec` to `editorconfig-checker`, so the check fails with "command not found" since the unpinned image was updated. Calls the binary by its new name and pins the image to major version 4, so that future breaking releases do not break the CI.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four small fixes for building and running ipfixprobe on embedded or cross-compiled targets such as OpenWrt:
ur_processor.sh.The default build works as before.
Details
cmake: add ENABLE_PROCESS_QUIC optionThe QUIC process plugin is the only part of ipfixprobe that uses OpenSSL (to decrypt QUIC Initial packets). Because the plugin is always built, OpenSSL is a hard build and runtime dependency of the whole project. The new
ENABLE_PROCESS_QUICoption defaults toON. OpenSSL is only looked up when the option is on. This lets ipfixprobe be built for small devices that don't ship OpenSSL.cmake: look up ur_processor.sh instead of hard-coding its pathThe UniRec field generator always ran from
/usr/bin/nemea/ur_processor.shon the build host. In cross builds the script is staged somewhere else, and the build host may not have Nemea installed at all. The script is now found withfind_program()./usr/bin/nemeastays as a search path, so existing setups keep working, and the location can be overridden with-DUR_PROCESSOR=<path>.process: fix build on 32-bit targetsOn 32-bit targets,
size_tis a different type fromuint64_tandunsigned long, which breaks the build in two places:tls_parser.cpp:quic_get_variable_length()takes the offset asuint64_t&, butparse_quic_user_agent()passed asize_t. The offset is now declared asuint64_t.tls.cpp:std::min()was called with asize_tand a99ULliteral, so template argument deduction failed. It now usesstd::min<size_t>.tls: allocate the TLS_EXT_TYPE array before filling itRecordExtTLS::fill_unirec()allocatedF_QUIC_TLS_EXT_TYPEbut then filledF_TLS_EXT_TYPE. The allocation failed silently because that field isn't in the TLS template.ur_array_set()then grew the array one element at a time, moving the rest of the record on every element. The correct field is now allocated. The exported data doesn't change; only the needless reallocations go away.✅ Checks
master