diff options
Diffstat (limited to 'net-analyzer/pmacct/files')
-rw-r--r-- | net-analyzer/pmacct/files/pmacct-1.7.4-nDPI-3.2.patch | 47 | ||||
-rw-r--r-- | net-analyzer/pmacct/files/pmacctd-init.d | 2 |
2 files changed, 48 insertions, 1 deletions
diff --git a/net-analyzer/pmacct/files/pmacct-1.7.4-nDPI-3.2.patch b/net-analyzer/pmacct/files/pmacct-1.7.4-nDPI-3.2.patch new file mode 100644 index 000000000000..bcbdbc834cad --- /dev/null +++ b/net-analyzer/pmacct/files/pmacct-1.7.4-nDPI-3.2.patch @@ -0,0 +1,47 @@ +--- 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) { diff --git a/net-analyzer/pmacct/files/pmacctd-init.d b/net-analyzer/pmacct/files/pmacctd-init.d index 1dccfcdd80f5..bfc59c07abb8 100644 --- a/net-analyzer/pmacct/files/pmacctd-init.d +++ b/net-analyzer/pmacct/files/pmacctd-init.d @@ -27,7 +27,7 @@ start() { start-stop-daemon --start \ --pidfile "${PMACCTDPID}" \ --exec /usr/sbin/"${SVCNAME}" \ - -- -D -f "${PMACCTDCONF}" \ -F "${PMACCTDPID}" ${OPTS} + -- -D -f "${PMACCTDCONF}" -F "${PMACCTDPID}" ${OPTS} eend $? } |