summaryrefslogtreecommitdiff
path: root/net/ndpi
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2019-07-12 09:30:34 +0000
committeradam <adam@pkgsrc.org>2019-07-12 09:30:34 +0000
commit499d2eb771d790fb342218c36470cb487697ffe9 (patch)
tree344378209815ad39d44197c950a19507268ef2ff /net/ndpi
parent910203c7ba9a38b9020e8773907858baa737df7d (diff)
downloadpkgsrc-499d2eb771d790fb342218c36470cb487697ffe9.tar.gz
ndpi: updated to 2.8
2.8 Stable New Supported Protocols and Services * Added Modbus over TCP dissector Improvements * Wireshark Lua plugin compatibility with Wireshark 3 * Improved MDNS dissection * Improved HTTP response code handling * Full dissection of HTTP responses Fixes * Fixed false positive mining detection * Fixed invalid TCP DNS dissection * Releasing buffers upon realloc failures * ndpiReader: Prevents references after free * Endianness fixes * Fixed IPv6 HTTP traffic dissection * Fixed H.323 detection Other * Disabled ookla statistics which need to be improved * Support for custom protocol files of arbitrary length * Update radius.c to RFC2865
Diffstat (limited to 'net/ndpi')
-rw-r--r--net/ndpi/Makefile4
-rw-r--r--net/ndpi/PLIST3
-rw-r--r--net/ndpi/buildlink3.mk4
-rw-r--r--net/ndpi/distinfo18
-rw-r--r--net/ndpi/patches/patch-Makefile.am15
-rw-r--r--net/ndpi/patches/patch-autogen.sh21
-rw-r--r--net/ndpi/patches/patch-configure.seed30
-rw-r--r--net/ndpi/patches/patch-src_lib_Makefile.in94
-rw-r--r--net/ndpi/patches/patch-src_lib_ndpi__main.c16
-rw-r--r--net/ndpi/patches/patch-src_lib_third__party_include_hash.h13
10 files changed, 73 insertions, 145 deletions
diff --git a/net/ndpi/Makefile b/net/ndpi/Makefile
index 67e617e09ff..2bc123d61ff 100644
--- a/net/ndpi/Makefile
+++ b/net/ndpi/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.5 2018/10/18 16:24:29 adam Exp $
+# $NetBSD: Makefile,v 1.6 2019/07/12 09:30:34 adam Exp $
-DISTNAME= nDPI-2.4
+DISTNAME= nDPI-2.8
PKGNAME= ${DISTNAME:tl}
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GITHUB:=ntop/}
diff --git a/net/ndpi/PLIST b/net/ndpi/PLIST
index 9f6509db2ac..165072bf2d4 100644
--- a/net/ndpi/PLIST
+++ b/net/ndpi/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2018/10/18 16:24:29 adam Exp $
+@comment $NetBSD: PLIST,v 1.3 2019/07/12 09:30:34 adam Exp $
bin/ndpiReader
include/ndpi/ndpi_api.h
include/ndpi/ndpi_config.h
@@ -13,4 +13,5 @@ include/ndpi/ndpi_win32.h
lib/libndpi.a
lib/libndpi.so
lib/libndpi.so.${PKGVERSION}.0
+lib/libndpi.so.2
lib/pkgconfig/libndpi.pc
diff --git a/net/ndpi/buildlink3.mk b/net/ndpi/buildlink3.mk
index 82e31f4823c..f61f15478b1 100644
--- a/net/ndpi/buildlink3.mk
+++ b/net/ndpi/buildlink3.mk
@@ -1,11 +1,11 @@
-# $NetBSD: buildlink3.mk,v 1.1 2016/04/08 16:51:23 adam Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2019/07/12 09:30:34 adam Exp $
BUILDLINK_TREE+= ndpi
.if !defined(NDPI_BUILDLINK3_MK)
NDPI_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.ndpi+= ndpi>=1.7
+BUILDLINK_API_DEPENDS.ndpi+= ndpi>=2.8
BUILDLINK_PKGSRCDIR.ndpi?= ../../net/ndpi
.include "../../textproc/json-c/buildlink3.mk"
diff --git a/net/ndpi/distinfo b/net/ndpi/distinfo
index f3900c359ae..03a6d80a3d1 100644
--- a/net/ndpi/distinfo
+++ b/net/ndpi/distinfo
@@ -1,12 +1,10 @@
-$NetBSD: distinfo,v 1.4 2018/10/18 16:24:29 adam Exp $
+$NetBSD: distinfo,v 1.5 2019/07/12 09:30:34 adam Exp $
-SHA1 (nDPI-2.4.tar.gz) = 6ff0d034a2badade2e1deb835594a42fc297646a
-RMD160 (nDPI-2.4.tar.gz) = 5f022327354c55a773d17e83f76d50cc68fa3c78
-SHA512 (nDPI-2.4.tar.gz) = 7c746c167ab3ebafbe8646f752c95e32d66237a0a86adeec9ded1ec7e20f62170a9b1c4e5d25594f6459f5c0f616c27c5b393151d936471590f16df3fa3fa884
-Size (nDPI-2.4.tar.gz) = 19308586 bytes
-SHA1 (patch-autogen.sh) = 61dbff4cce826994726da317667de9534030c5c1
-SHA1 (patch-configure.seed) = 885956b856b37d3f77e2c05630eee60af8ba5759
+SHA1 (nDPI-2.8.tar.gz) = 5b5f613cf55deeb040483f7c04ede7a2ed415c26
+RMD160 (nDPI-2.8.tar.gz) = c26bfadeee1db4abbf86a06fdfa338cbfaf42d9b
+SHA512 (nDPI-2.8.tar.gz) = aae757047810bbc32700ecf7ac2e5df4b93528021a50da4a0b83865a5248dfca8b1643c75aa7eeb6eac4f155638d45666db487318b2be9adb2f3412cb8ec8497
+Size (nDPI-2.8.tar.gz) = 19754226 bytes
+SHA1 (patch-Makefile.am) = 3f4649a55e519a21e1c5b645669f1febcef82d4e
+SHA1 (patch-configure.seed) = 154f2d6a690bd6e7e01862769bcf0fa4b1a86ad6
SHA1 (patch-src_include_ndpi__includes.h) = db5da9ca24ecf32fd8c264e193af280814dc74c6
-SHA1 (patch-src_lib_Makefile.in) = 60b03e8e6daaa9d882732c6fcf9897f5d843c3de
-SHA1 (patch-src_lib_ndpi__main.c) = 6a10a5318a033ce686b7fef37b0f2bf597b4eb06
-SHA1 (patch-src_lib_third__party_include_hash.h) = af82b9a7b418a5cba0c678c40d331dc5bffc0f0b
+SHA1 (patch-src_lib_Makefile.in) = 458e095e55a3b6f24166813a249350a32a1e0589
diff --git a/net/ndpi/patches/patch-Makefile.am b/net/ndpi/patches/patch-Makefile.am
new file mode 100644
index 00000000000..21642a9fd11
--- /dev/null
+++ b/net/ndpi/patches/patch-Makefile.am
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile.am,v 1.1 2019/07/12 09:30:34 adam Exp $
+
+Use standard pkgconfigdir.
+
+--- Makefile.am.orig 2019-07-11 10:20:02.000000000 +0000
++++ Makefile.am
+@@ -1,7 +1,7 @@
+ ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = src/lib example tests
+
+-pkgconfigdir = $(prefix)/libdata/pkgconfig
++pkgconfigdir = $(prefix)/lib/pkgconfig
+ pkgconfig_DATA = libndpi.pc
+
+ EXTRA_DIST = autogen.sh
diff --git a/net/ndpi/patches/patch-autogen.sh b/net/ndpi/patches/patch-autogen.sh
deleted file mode 100644
index 9bb6d52b6f0..00000000000
--- a/net/ndpi/patches/patch-autogen.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-autogen.sh,v 1.1 2018/10/18 16:24:29 adam Exp $
-
-Do not remove src/lib/Makefile.in.
-Do not lauch 'configure'.
-
---- autogen.sh.orig 2018-08-22 06:29:35.000000000 +0000
-+++ autogen.sh
-@@ -5,7 +5,7 @@ NDPI_MINOR="4"
- NDPI_PATCH="0"
- NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH"
-
--rm -f configure config.h config.h.in src/lib/Makefile.in
-+rm -f configure config.h config.h.in
-
- AUTOCONF=$(command -v autoconf)
- AUTOMAKE=$(command -v automake)
-@@ -45,4 +45,3 @@ cat configure | sed "s/#define PACKAGE/#
- cat configure.tmp > configure
-
- chmod +x configure
--./configure $*
diff --git a/net/ndpi/patches/patch-configure.seed b/net/ndpi/patches/patch-configure.seed
index 63664a8fc2c..486b4c76530 100644
--- a/net/ndpi/patches/patch-configure.seed
+++ b/net/ndpi/patches/patch-configure.seed
@@ -1,19 +1,10 @@
-$NetBSD: patch-configure.seed,v 1.1 2018/10/18 16:24:29 adam Exp $
+$NetBSD: patch-configure.seed,v 1.2 2019/07/12 09:30:34 adam Exp $
-Fixes from https://github.com/ntop/nDPI/issues/600
Portability fix.
---- configure.seed.orig 2018-08-22 06:29:35.000000000 +0000
+--- configure.seed.orig 2019-03-01 17:04:18.000000000 +0000
+++ configure.seed
-@@ -10,6 +10,7 @@ AC_PROG_CC
- AM_PROG_CC_C_O
- AX_PTHREAD
-
-+NDPI_VERSION_SHORT="@NDPI_VERSION_SHORT@"
- NDPI_MAJOR="@NDPI_MAJOR@"
- NDPI_MINOR="@NDPI_MINOR@"
- NDPI_PATCH="@NDPI_PATCH@"
-@@ -104,7 +105,7 @@ AC_ARG_ENABLE([json-c],
+@@ -124,7 +124,7 @@ AC_ARG_ENABLE([json-c],
AS_IF([test "x$enable_json_c" != "xno"], [
PKG_CONFIG_PATH=/usr/local/share/pkgconfig:$PKG_CONFIG_PATH
pkg-config --exists json-c
@@ -22,18 +13,3 @@ Portability fix.
[
CFLAGS="$CFLAGS $(pkg-config --cflags json-c)"
LDFLAGS="$LDFLAGS $(pkg-config --libs json-c)"
-@@ -127,12 +128,13 @@ AC_ARG_ENABLE([debug-messages],
-
- AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
-
--AC_CONFIG_FILES([Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h])
-+AC_CONFIG_FILES([Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile])
- AC_CONFIG_HEADERS(src/include/ndpi_config.h)
- AC_SUBST(GIT_RELEASE)
- AC_SUBST(NDPI_MAJOR)
- AC_SUBST(NDPI_MINOR)
- AC_SUBST(NDPI_PATCH)
-+AC_SUBST(NDPI_VERSION_SHORT)
- AC_SUBST(SVN_DATE)
- AC_SUBST(JSON_C_LIB)
- AC_SUBST(PCAP_INC)
diff --git a/net/ndpi/patches/patch-src_lib_Makefile.in b/net/ndpi/patches/patch-src_lib_Makefile.in
index da838e1e3f5..7857650b6a1 100644
--- a/net/ndpi/patches/patch-src_lib_Makefile.in
+++ b/net/ndpi/patches/patch-src_lib_Makefile.in
@@ -1,61 +1,49 @@
-$NetBSD: patch-src_lib_Makefile.in,v 1.1 2018/10/18 16:24:29 adam Exp $
+$NetBSD: patch-src_lib_Makefile.in,v 1.2 2019/07/12 09:30:34 adam Exp $
-Add missing src/lib/Makefile.in
+Fix building on Darwin.
---- /dev/null 2018-10-18 13:00:10.000000000 +0000
+--- src/lib/Makefile.in.orig 2019-03-01 17:04:18.000000000 +0000
+++ src/lib/Makefile.in
-@@ -0,0 +1,54 @@
-+#
-+# Simple non-autotools dependent makefile
-+#
-+# ./autogen.sh
-+# cd src/lib
-+# make Makefile
-+#
-+
-+
-+#
-+# Installation directories
-+#
-+libdir = ${PREFIX}/lib
-+includedir = ${PREFIX}/include/ndpi
-+CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION
-+RANLIB = ranlib
-+
-+OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o
-+HEADERS = $(wildcard ../include/*.h)
-+NDPI_LIB_STATIC = libndpi.a
+@@ -21,8 +21,15 @@ OBJECTS = $(patsubst protocols/%.c, pr
+ HEADERS = $(wildcard ../include/*.h)
+ NDPI_VERSION_MAJOR = @NDPI_MAJOR@
+ NDPI_LIB_STATIC = libndpi.a
+ifeq ($(OS),Darwin)
+NDPI_LIB_SHARED_BASE = libndpi.dylib
+NDPI_LIB_SHARED = libndpi.@NDPI_VERSION_SHORT@.dylib
-+LDFLAGS += -install_name ${PREFIX}/lib/${NDPI_LIB_SHARED}
++NDPI_LIB_SHARED_SHORT= libndpi.@NDPI_MAJOR@.dylib
+else
-+NDPI_LIB_SHARED_BASE = libndpi.so
-+NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
+ NDPI_LIB_SHARED_BASE = libndpi.so
+ NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
++NDPI_LIB_SHARED_SHORT= $(NDPI_LIB_SHARED_BASE).@NDPI_MAJOR@
+endif
-+NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
-+
-+all: $(NDPI_LIBS)
-+
-+ndpi_main.c: ndpi_content_match.c.inc
-+
-+$(NDPI_LIB_STATIC): $(OBJECTS)
-+ ar rc $@ $(OBJECTS)
-+ $(RANLIB) $@
-+
-+$(NDPI_LIB_SHARED): $(OBJECTS)
-+ $(CC) -shared -fPIC ${LDFLAGS} -o $@ $(OBJECTS)
-+ ln -Fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
-+
-+%.o: %.c $(HEADERS) Makefile
-+ $(CC) $(CFLAGS) -c $< -o $@
-+
-+clean:
-+ /bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo
-+
-+install: $(NDPI_LIBS)
-+ mkdir -p $(DESTDIR)$(libdir)
-+ cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
-+ ln -Fs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
-+ mkdir -p $(DESTDIR)$(includedir)
-+ cp ../include/*.h $(DESTDIR)$(includedir)
+ NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
+
+ ifneq ($(OS),Windows_NT)
+@@ -30,8 +37,7 @@ OS := $(shell uname)
+ endif
+
+ ifeq ($(OS),Darwin)
+-CC=clang
+-SONAME_FLAG=
++SONAME_FLAG=-install_name $(libdir)/${NDPI_LIB_SHARED}
+ else
+ SONAME_FLAG=-Wl,-soname,$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
+ endif
+@@ -47,7 +53,7 @@ $(NDPI_LIB_STATIC): $(OBJECTS)
+ $(NDPI_LIB_SHARED): $(OBJECTS)
+ $(CC) -shared -fPIC $(SONAME_FLAG) -o $@ $(OBJECTS)
+ ln -Ffs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
+- ln -Ffs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
++ ln -Ffs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_SHORT)
+
+ %.o: %.c $(HEADERS) Makefile
+ $(CC) $(CFLAGS) -c $< -o $@
+@@ -62,6 +68,6 @@ 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 $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_SHORT)
+ mkdir -p $(DESTDIR)$(includedir)
+ cp ../include/*.h $(DESTDIR)$(includedir)
diff --git a/net/ndpi/patches/patch-src_lib_ndpi__main.c b/net/ndpi/patches/patch-src_lib_ndpi__main.c
deleted file mode 100644
index 62a2d7fcf00..00000000000
--- a/net/ndpi/patches/patch-src_lib_ndpi__main.c
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-src_lib_ndpi__main.c,v 1.1 2018/10/18 16:24:29 adam Exp $
-
-Fix build (https://github.com/ntop/nDPI/issues/600).
-
---- src/lib/ndpi_main.c.orig 2018-10-08 10:11:40.000000000 +0000
-+++ src/lib/ndpi_main.c
-@@ -43,9 +43,7 @@
-
- #include "ndpi_content_match.c.inc"
- #include "third_party/include/ndpi_patricia.h"
--#include "third_party/src/ndpi_patricia.c"
- #include "third_party/include/hash.h"
--#include "third_party/src/hash.c"
-
- #ifdef HAVE_HYPERSCAN
- #include <hs/hs.h>
diff --git a/net/ndpi/patches/patch-src_lib_third__party_include_hash.h b/net/ndpi/patches/patch-src_lib_third__party_include_hash.h
deleted file mode 100644
index b5d31af8485..00000000000
--- a/net/ndpi/patches/patch-src_lib_third__party_include_hash.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-src_lib_third__party_include_hash.h,v 1.1 2018/10/18 16:24:29 adam Exp $
-
-Fix build (https://github.com/ntop/nDPI/issues/600).
-
---- src/lib/third_party/include/hash.h.orig 2018-10-08 10:12:59.000000000 +0000
-+++ src/lib/third_party/include/hash.h
-@@ -25,5 +25,6 @@ extern int ht_hash( hashtable_t *hashtab
- extern entry_t *ht_newpair( char *key, u_int16_t value );
- extern void ht_set( hashtable_t *hashtable, char *key, u_int16_t value );
- extern u_int16_t ht_get( hashtable_t *hashtable, char *key );
-+extern void ht_free( hashtable_t *hashtable );
-
- #endif /* _HASH_H_ */