From aaa528b2e8be012c7c67299af41e227d2bc4dc45 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:29:32 +0200 Subject: If `NDPI_KNOWN_PROTOCOL_ON_NON_STANDARD_PORT` risk is disabled, avoid some work (#2899) --- src/lib/ndpi_main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 57de07ce6..117689656 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -9678,6 +9678,9 @@ static void check_proto_on_non_std_port_risk(struct ndpi_detection_module_struct default_ports_tree_node_t *found; ndpi_port_range *default_ports; + if(!is_flowrisk_enabled(ndpi_str, NDPI_KNOWN_PROTOCOL_ON_NON_STANDARD_PORT)) + return; + if(packet->udp) found = ndpi_get_guessed_protocol_id(ndpi_str, IPPROTO_UDP, ntohs(flow->c_port), -- cgit v1.2.3