summaryrefslogtreecommitdiff
path: root/net-libs/nDPI/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/nDPI/files')
-rw-r--r--net-libs/nDPI/files/nDPI-2.2-libcache-include.patch32
-rw-r--r--net-libs/nDPI/files/nDPI-2.8-fix-pkgconfigdir.patch11
-rw-r--r--net-libs/nDPI/files/nDPI-2.8-relative-sym.patch12
-rw-r--r--net-libs/nDPI/files/nDPI-3.4-configure-fail-libcap.patch19
-rw-r--r--net-libs/nDPI/files/nDPI-3.4-fix-oob-in-kerberos-dissector.patch16
5 files changed, 35 insertions, 55 deletions
diff --git a/net-libs/nDPI/files/nDPI-2.2-libcache-include.patch b/net-libs/nDPI/files/nDPI-2.2-libcache-include.patch
deleted file mode 100644
index 44d78e99f327..000000000000
--- a/net-libs/nDPI/files/nDPI-2.2-libcache-include.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/src/include/Makefile.am
-+++ b/src/include/Makefile.am
-@@ -7,4 +7,5 @@
- ndpi_protocol_ids.h \
- ndpi_protocols.h \
- ndpi_win32.h \
-- ndpi_includes.h
-+ ndpi_includes.h \
-+ libcache.h
---- a/src/include/ndpi_typedefs.h
-+++ b/src/include/ndpi_typedefs.h
-@@ -25,7 +25,7 @@
- #define __NDPI_TYPEDEFS_H__
-
- #include "ndpi_define.h"
--#include "../lib/third_party/include/libcache.h"
-+#include "libcache.h"
-
- #define BT_ANNOUNCE
- #define SNAP_EXT
---- a/src/lib/Makefile.am
-+++ b/src/lib/Makefile.am
-@@ -12,7 +12,8 @@
- ../include/ndpi_includes.h \
- ../include/ndpi_protocol_ids.h \
- ../include/ndpi_protocols.h \
-- ../include/ndpi_typedefs.h
-+ ../include/ndpi_typedefs.h \
-+ ../include/libcache.h
-
- libndpi_la_SOURCES = ndpi_content_match.c.inc \
- ndpi_main.c \
diff --git a/net-libs/nDPI/files/nDPI-2.8-fix-pkgconfigdir.patch b/net-libs/nDPI/files/nDPI-2.8-fix-pkgconfigdir.patch
deleted file mode 100644
index f6f805bbeeb1..000000000000
--- a/net-libs/nDPI/files/nDPI-2.8-fix-pkgconfigdir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,7 @@
- ACLOCAL_AMFLAGS = -I m4
- SUBDIRS = src/lib example tests
-
--pkgconfigdir = $(prefix)/libdata/pkgconfig
-+pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = libndpi.pc
-
- EXTRA_DIST = autogen.sh
diff --git a/net-libs/nDPI/files/nDPI-2.8-relative-sym.patch b/net-libs/nDPI/files/nDPI-2.8-relative-sym.patch
deleted file mode 100644
index 6a0230d65599..000000000000
--- a/net-libs/nDPI/files/nDPI-2.8-relative-sym.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/src/lib/Makefile.in
-+++ b/src/lib/Makefile.in
-@@ -61,7 +61,7 @@
- install: $(NDPI_LIBS)
- mkdir -p $(DESTDIR)$(libdir)
- cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
-- ln -Ffs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
-- ln -Ffs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
-+ ln -Ffs $(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
-+ ln -Ffs $(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
- mkdir -p $(DESTDIR)$(includedir)
- cp ../include/*.h $(DESTDIR)$(includedir)
diff --git a/net-libs/nDPI/files/nDPI-3.4-configure-fail-libcap.patch b/net-libs/nDPI/files/nDPI-3.4-configure-fail-libcap.patch
new file mode 100644
index 000000000000..7ae5a04d4e8c
--- /dev/null
+++ b/net-libs/nDPI/files/nDPI-3.4-configure-fail-libcap.patch
@@ -0,0 +1,19 @@
+Ensure that we fail if libpcap can't be detected, rather than exiting with a success return code.
+--- a/configure.seed
++++ b/configure.seed
+@@ -126,12 +126,9 @@ case "$host" in
+ AC_CHECK_LIB([dl], [dlopen, dlsym], [DL_LIB="-ldl"],[AC_CHECK_LIB([c], [dlopen, dlsym], [DL_LIB="-lc"],[AC_MSG_ERROR([unable to find the dlopen(), dlsym() functions]) ]) ])
+ else
+ AC_CHECK_LIB([pcap], [pcap_open_live], [PCAP_LIB="-lpcap"])
+- if test $ac_cv_lib_pcap_pcap_open_live = "no"; then :
+- echo ""
+- echo "ERROR: Missing libpcap(-dev) library required to compile the example application"
+- echo "ERROR: Please install it and try again"
+- exit
+- fi
++ if test $ac_cv_lib_pcap_pcap_open_live = "no"; then :
++ AC_MSG_ERROR([Cannot find libpcap which is required to compile the example application])
++ fi
+ fi
+ ;;
+ esac
diff --git a/net-libs/nDPI/files/nDPI-3.4-fix-oob-in-kerberos-dissector.patch b/net-libs/nDPI/files/nDPI-3.4-fix-oob-in-kerberos-dissector.patch
new file mode 100644
index 000000000000..7e8f381cdeab
--- /dev/null
+++ b/net-libs/nDPI/files/nDPI-3.4-fix-oob-in-kerberos-dissector.patch
@@ -0,0 +1,16 @@
+Sourced from https://github.com/gentoo/gentoo/commit/c02681fcb7839ac1829ec09394334ddbca1b0aea
+
+diff --git a/src/lib/protocols/kerberos.c b/src/lib/protocols/kerberos.c
+index fa0ab6cb..32319668 100644
+--- a/src/lib/protocols/kerberos.c
++++ b/src/lib/protocols/kerberos.c
+@@ -189,7 +189,8 @@ void ndpi_search_kerberos(struct ndpi_detection_module_struct *ndpi_struct,
+
+ body_offset = koffsetp + 1 + pad_len;
+
+- for(i=0; i<10; i++) if(body_offset<packet->payload_packet_len && packet->payload[body_offset] != 0x05) body_offset++; /* ASN.1 */
++ for(i=0; i<10 && body_offset < packet->payload_packet_len; i++)
++ if(packet->payload[body_offset] != 0x05) body_offset++; /* ASN.1 */
+ #ifdef KERBEROS_DEBUG
+ printf("body_offset=%u [%02X %02X] [byte 0 must be 0x05]\n", body_offset, packet->payload[body_offset], packet->payload[body_offset+1]);
+ #endif