Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:

editor-config:
runs-on: ubuntu-latest
container: mstruebing/editorconfig-checker
container: mstruebing/editorconfig-checker:4
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Check editorconfig
run: ec --exclude .git --exclude tests/functional/inputs
run: editorconfig-checker --exclude .git --exclude tests/functional/inputs
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ option(ENABLE_INPUT_DPDK "Enable build of input DPDK plugin"
option(ENABLE_INPUT_NFB "Enable build of input NFB plugin" OFF)
option(ENABLE_OUTPUT_UNIREC "Enable build of output UNIREC plugin" OFF)
option(ENABLE_PROCESS_EXPERIMENTAL "Enable build of experimental process plugins" OFF)
option(ENABLE_PROCESS_QUIC "Enable build of QUIC process plugin (requires OpenSSL)" ON)
option(ENABLE_MILLISECONDS_TIMESTAMP "Compile ipfixprobe with miliseconds timestamp precesion" OFF)
option(ENABLE_NEMEA "Enable build of NEMEA plugins" OFF)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ You can enable or disable optional plugins and features via CMake flags:
| `-DENABLE_INPUT_DPDK=ON` | OFF | Enable high-speed DPDK input plugin (requires `dpdk-devel`) |
| `-DENABLE_INPUT_NFB=ON` | OFF | Enable input plugin for CESNET NFB/NDP cards (requires `netcope-common`) |
| `-DENABLE_PROCESS_EXPERIMENTAL=ON` | OFF | Enable experimental process plugins |
| `-DENABLE_PROCESS_QUIC=OFF` | ON | Disable QUIC process plugin (drops the `openssl` dependency) |
| `-DENABLE_NEMEA=ON` | OFF | Enable support for NEMEA modules (requires `nemea-framework-devel` ) |

Run the command to view all available build options:
Expand Down
4 changes: 3 additions & 1 deletion cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ find_package(Threads REQUIRED)
find_package(Atomic REQUIRED)
find_package(Unwind REQUIRED)
find_package(LZ4 REQUIRED)
find_package(OpenSSL REQUIRED)
if (ENABLE_PROCESS_QUIC)
find_package(OpenSSL REQUIRED)
endif()

if (ENABLE_INPUT_PCAP)
pkg_check_modules(PCAP REQUIRED libpcap)
Expand Down
7 changes: 6 additions & 1 deletion src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ if(ENABLE_NEMEA OR ENABLE_OUTPUT_UNIREC)
${OUTPUT_DIR}/fields.h
)

find_program(UR_PROCESSOR ur_processor.sh
PATHS /usr/bin/nemea
REQUIRED
)

execute_process(
COMMAND /usr/bin/nemea/ur_processor.sh -i ${CMAKE_CURRENT_SOURCE_DIR} -o ${OUTPUT_DIR}
COMMAND ${UR_PROCESSOR} -i ${CMAKE_CURRENT_SOURCE_DIR} -o ${OUTPUT_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE SCRIPT_RESULT
)
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/process/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ add_subdirectory(dnssd)
add_subdirectory(netbios)
add_subdirectory(passiveDns)
add_subdirectory(smtp)
add_subdirectory(quic)
if (ENABLE_PROCESS_QUIC)
add_subdirectory(quic)
endif()
add_subdirectory(tls)
add_subdirectory(http)

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/process/common/tlsParser/tls_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ void TLSParser::parse_quic_user_agent(
= quic_transport_parameters_begin + extension_length;
for (const uint8_t* parameter = quic_transport_parameters_begin;
parameter < quic_transport_parameters_end;) {
size_t offset = 0UL;
uint64_t offset = 0UL;
const size_t parameter_id = quic_get_variable_length(parameter, offset);
const size_t parameter_length = quic_get_variable_length(parameter, offset);
if (parameter + offset + parameter_length > quic_transport_parameters_end) {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/process/tls/src/tls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ static std::string get_ja4_string(const TLSParser& parser, uint8_t ip_proto)

const char sni_label = parser.get_server_names().empty() ? 'i' : 'd';

const uint8_t ciphers_count = std::min(parser.get_cipher_suits().size(), 99UL);
const uint8_t ciphers_count = std::min<size_t>(parser.get_cipher_suits().size(), 99);

const uint8_t extension_count = std::min(parser.get_extensions().size(), 99UL);
const uint8_t extension_count = std::min<size_t>(parser.get_extensions().size(), 99);

const auto alpn_label = get_alpn_label(parser);

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/process/tls/src/tls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct RecordExtTLS : public RecordExt {
ur_set_string(tmplt, record, F_TLS_ALPN, alpn);
ur_set_var(tmplt, record, F_TLS_JA3, ja3, sizeof(ja3));
ur_set_string(tmplt, record, F_TLS_JA4, ja4);
ur_array_allocate(tmplt, record, F_QUIC_TLS_EXT_TYPE, extensions_buffer_size);
ur_array_allocate(tmplt, record, F_TLS_EXT_TYPE, extensions_buffer_size);
for (auto i = 0U; i < extensions_buffer_size; i++) {
ur_array_set(tmplt, record, F_TLS_EXT_TYPE, i, extension_types[i]);
}
Expand Down
Loading