--- a/configure.ac +++ b/configure.ac @@ -900,7 +900,7 @@ [ case "$enableval" in yes) AC_MSG_RESULT(yes) - PKG_CHECK_MODULES([NDPI], [libndpi >= 2.4], [ + PKG_CHECK_MODULES([NDPI], [libndpi >= 3.2], [ SUPPORTS="${SUPPORTS} ndpi" USING_NDPI="yes" --- a/src/ndpi/ndpi_util.c +++ b/src/ndpi/ndpi_util.c @@ -29,7 +29,8 @@ NDPI_PROTOCOL_BITMASK all; - struct ndpi_detection_module_struct *module = ndpi_init_detection_module(); + ndpi_init_prefs pm_ndpi_init_prefs = ndpi_no_prefs; + struct ndpi_detection_module_struct *module = ndpi_init_detection_module(pm_ndpi_init_prefs); struct pm_ndpi_workflow *workflow = ndpi_calloc(1, sizeof(struct pm_ndpi_workflow)); log_notification_init(&log_notifications.ndpi_cache_full); @@ -77,6 +78,8 @@ NDPI_BITMASK_SET_ALL(all); ndpi_set_protocol_detection_bitmask2(workflow->ndpi_struct, &all); + ndpi_finalize_initalization(workflow->ndpi_struct); + return workflow; } --- a/src/ndpi/ndpi.c +++ b/src/ndpi/ndpi.c @@ -373,11 +373,7 @@ if (flow->detection_completed || flow->tcp_finished) { if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) -#ifdef WITH_NDPI26 - flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, workflow->prefs.protocol_guess); -#else - flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow); -#endif + flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, 1, workflow->prefs.protocol_guess); if (workflow->prefs.protocol_guess) { if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN && !flow->guess_completed) {