diff --git a/net/ntopng/Makefile b/net/ntopng/Makefile index 5c3ece4cc23..ab70b4c67bc 100644 --- a/net/ntopng/Makefile +++ b/net/ntopng/Makefile @@ -1,15 +1,9 @@ -# $OpenBSD: Makefile,v 1.2 2016/04/27 21:58:06 sthen Exp $ +# $OpenBSD: Makefile,v 1.3 2016/07/09 12:14:28 sthen Exp $ COMMENT= network traffic probe with web ui and dpi -GH_ACCOUNT= ntop -GH_PROJECT= ntopng -GH_COMMIT= 6bdf05cb7c6209875ae7969c991a882fa61b58dc -D= 20160426 -DISTNAME= ntopng-2.3pre$D -MASTER_SITES0= https://github.com/ntop/nDPI/archive/ -DISTFILES= ${DISTNAME}{${GH_COMMIT}}.tar.gz \ - nDPI-dev-20160426{7c1e8ba2bf3a4d6e7784f0d8051b8745074c76f1}.tar.gz:0 +DISTNAME= ntopng-2.4-stable +PKGNAME= ${DISTNAME:S/-stable//} CATEGORIES= net @@ -23,7 +17,7 @@ PERMIT_PACKAGE_CDROM= Yes WANTLIB += GeoIP c crypto curl hiredis json-c luajit-5.1 m WANTLIB += mysqlclient pcap pthread rrd sqlite3 ssl stdc++ z zmq -#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ntop/} +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ntop/} BUILD_DEPENDS= devel/libtool \ ${MODGNU_AUTOCONF_DEPENDS} \ @@ -57,12 +51,9 @@ MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/nDPI NO_TEST= Yes -post-extract: - mv ${WRKDIR}/nDPI-* ${WRKSRC}/nDPI - post-patch: cd ${WRKSRC}; env AUTOCONF_VERSION=${AUTOCONF_VERSION} \ - AUTOMAKE_VERSION=${AUTOMAKE_VERSION} TODAY="$D" sh -c \ + AUTOMAKE_VERSION=${AUTOMAKE_VERSION} sh -c \ "./autogen.sh; cd nDPI; ./autogen.sh" pre-configure: diff --git a/net/ntopng/distinfo b/net/ntopng/distinfo index 509972e6f3c..a5ecc7e24d7 100644 --- a/net/ntopng/distinfo +++ b/net/ntopng/distinfo @@ -1,4 +1,2 @@ -SHA256 (nDPI-dev-20160426.tar.gz) = PabbyIABK69280Cj406bIqwJizteujouVWaxNqemIhE= -SHA256 (ntopng-2.3pre20160426.tar.gz) = V8CUmPJRJTofnllR4kMpkLUPr42w11ZYIdX4CpMcQ1Q= -SIZE (nDPI-dev-20160426.tar.gz) = 6953268 -SIZE (ntopng-2.3pre20160426.tar.gz) = 27653065 +SHA256 (ntopng-2.4-stable.tar.gz) = 9E4vrzy3EtdRBvycWUE5+/1Dft9Kfm6e1lE04fR601U= +SIZE (ntopng-2.4-stable.tar.gz) = 134074662 diff --git a/net/ntopng/patches/patch-include_Flow_h b/net/ntopng/patches/patch-include_Flow_h index 98a91a92b76..bc8dc6528b9 100644 --- a/net/ntopng/patches/patch-include_Flow_h +++ b/net/ntopng/patches/patch-include_Flow_h @@ -1,16 +1,16 @@ -$OpenBSD: patch-include_Flow_h,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- include/Flow.h.orig Mon Apr 25 09:27:48 2016 -+++ include/Flow.h Tue Apr 26 17:53:54 2016 -@@ -137,7 +137,7 @@ class Flow : public GenericHashEntry { +$OpenBSD: patch-include_Flow_h,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- include/Flow.h.orig Mon Jun 27 20:31:18 2016 ++++ include/Flow.h Sat Jul 9 12:55:43 2016 +@@ -155,7 +155,7 @@ class Flow : public GenericHashEntry { void checkFlowCategory(); void setBittorrentHash(char *hash); bool isLowGoodput(); - void updatePacketStats(InterarrivalStats *stats, const struct timeval *when); + void updatePacketStats(InterarrivalStats *stats, const struct bpf_timeval *when); void dumpPacketStats(lua_State* vm, bool cli2srv_direction); - - public: -@@ -182,8 +182,8 @@ class Flow : public GenericHashEntry { + inline u_int32_t getCurrentInterArrivalTime(time_t now, bool cli2srv_direction) { + return(1000 /* msec */ +@@ -215,8 +215,8 @@ class Flow : public GenericHashEntry { void setDetectedProtocol(ndpi_protocol proto_id); void setJSONInfo(const char *json); bool isFlowPeer(char *numIP, u_int16_t vlanId); diff --git a/net/ntopng/patches/patch-include_NetworkInterface_h b/net/ntopng/patches/patch-include_NetworkInterface_h index 417f2d400be..79d111a64e3 100644 --- a/net/ntopng/patches/patch-include_NetworkInterface_h +++ b/net/ntopng/patches/patch-include_NetworkInterface_h @@ -1,7 +1,7 @@ -$OpenBSD: patch-include_NetworkInterface_h,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- include/NetworkInterface.h.orig Tue Apr 26 17:20:12 2016 -+++ include/NetworkInterface.h Tue Apr 26 17:25:49 2016 -@@ -194,7 +194,7 @@ class NetworkInterface { +$OpenBSD: patch-include_NetworkInterface_h,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- include/NetworkInterface.h.orig Mon Jun 27 20:31:18 2016 ++++ include/NetworkInterface.h Sat Jul 9 12:55:43 2016 +@@ -213,7 +213,7 @@ class NetworkInterface { u_int16_t vlan_id, struct ndpi_iphdr *iph, struct ndpi_ipv6hdr *ip6, diff --git a/net/ntopng/patches/patch-include_Utils_h b/net/ntopng/patches/patch-include_Utils_h index 5a9a6f31b2a..268824b89aa 100644 --- a/net/ntopng/patches/patch-include_Utils_h +++ b/net/ntopng/patches/patch-include_Utils_h @@ -1,6 +1,6 @@ -$OpenBSD: patch-include_Utils_h,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- include/Utils.h.orig Mon Apr 25 09:27:48 2016 -+++ include/Utils.h Tue Apr 26 17:56:40 2016 +$OpenBSD: patch-include_Utils_h,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- include/Utils.h.orig Mon Jun 27 20:31:18 2016 ++++ include/Utils.h Sat Jul 9 12:55:43 2016 @@ -47,6 +47,7 @@ class Utils { static char* trim(char *s); static u_int32_t hashString(char *s); @@ -9,11 +9,11 @@ $OpenBSD: patch-include_Utils_h,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ static bool file_exists(const char *path); static bool mkdir_tree(char *path); static const char* trend2str(ValueTrend t); -@@ -81,6 +82,7 @@ class Utils { +@@ -82,6 +83,7 @@ class Utils { static char* intoaV4(unsigned int addr, char* buf, u_short bufLen); static char* intoaV6(struct ndpi_in6_addr ipv6, u_int8_t bitmask, char* buf, u_short bufLen); static u_int32_t timeval2usec(const struct timeval *tv); + static u_int32_t timeval2usec(const struct bpf_timeval *tv); static void xor_encdec(u_char *data, int data_len, u_char *key); static bool isPrintableChar(u_char c); - }; + static const char* flowstatus2str(FlowStatus s); diff --git a/net/ntopng/patches/patch-include_ntop_defines_h b/net/ntopng/patches/patch-include_ntop_defines_h index 6a86f149fbb..60cb2b9d6ea 100644 --- a/net/ntopng/patches/patch-include_ntop_defines_h +++ b/net/ntopng/patches/patch-include_ntop_defines_h @@ -1,16 +1,16 @@ -$OpenBSD: patch-include_ntop_defines_h,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- include/ntop_defines.h.orig Mon Apr 25 09:27:48 2016 -+++ include/ntop_defines.h Mon Apr 25 19:49:20 2016 +$OpenBSD: patch-include_ntop_defines_h,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- include/ntop_defines.h.orig Mon Jun 27 20:31:18 2016 ++++ include/ntop_defines.h Sat Jul 9 12:56:10 2016 @@ -123,7 +123,7 @@ #define MAX_NUM_QUEUED_ADDRS 500 /* Maximum number of queued address for resolution */ #define MAX_NUM_QUEUED_CONTACTS 25000 - #define NTOP_COPYRIGHT "(C) 1998-15 ntop.org" --#define DEFAULT_PID_PATH "/var/tmp/ntopng.pid" + #define NTOP_COPYRIGHT "(C) 1998-2016 ntop.org" +-#define DEFAULT_PID_PATH "/var/run/ntopng.pid" +#define DEFAULT_PID_PATH "/var/run/ntopng/ntopng.pid" #define DOMAIN_CATEGORY "ntopng.domain.category" #define DOMAIN_TO_CATEGORIZE "ntopng.domain.tocategorize" #define DOMAIN_WHITELIST_CAT "ntopng.domain.whitelist" -@@ -260,18 +260,18 @@ +@@ -265,18 +265,18 @@ #define NTOPNG_NDPI_OS_PROTO_ID (NDPI_LAST_IMPLEMENTED_PROTOCOL+NDPI_MAX_NUM_CUSTOM_PROTOCOLS-2) #define CONST_DEFAULT_HOME_NET "192.168.1.0/24" diff --git a/net/ntopng/patches/patch-nDPI_example_ndpiReader_c b/net/ntopng/patches/patch-nDPI_example_ndpiReader_c index 52250dad7f8..d23784aa21b 100644 --- a/net/ntopng/patches/patch-nDPI_example_ndpiReader_c +++ b/net/ntopng/patches/patch-nDPI_example_ndpiReader_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-nDPI_example_ndpiReader_c,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- nDPI/example/ndpiReader.c.orig Tue Apr 26 17:09:12 2016 -+++ nDPI/example/ndpiReader.c Tue Apr 26 17:11:57 2016 -@@ -62,7 +62,7 @@ static char *_pcap_file[MAX_NUM_READER_THREADS]; /**< +$OpenBSD: patch-nDPI_example_ndpiReader_c,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- nDPI/example/ndpiReader.c.orig Mon Jun 27 20:31:24 2016 ++++ nDPI/example/ndpiReader.c Sat Jul 9 12:55:43 2016 +@@ -56,7 +56,7 @@ static char *_pcap_file[MAX_NUM_READER_THREADS]; /**< static FILE *playlist_fp[MAX_NUM_READER_THREADS] = { NULL }; /**< Ingress playlist */ static FILE *results_file = NULL; static char *results_path = NULL; @@ -10,7 +10,7 @@ $OpenBSD: patch-nDPI_example_ndpiReader_c,v 1.1.1.1 2016/04/26 20:56:01 sthen Ex static char *_protoFilePath = NULL; /**< Protocol file path */ #ifdef HAVE_JSON_C static char *_jsonFilePath = NULL; /**< JSON file path */ -@@ -180,7 +180,7 @@ static void parseOptions(int argc, char **argv) { +@@ -174,7 +174,7 @@ static void parseOptions(int argc, char **argv) { break; case 'f': @@ -19,7 +19,7 @@ $OpenBSD: patch-nDPI_example_ndpiReader_c,v 1.1.1.1 2016/04/26 20:56:01 sthen Ex break; case 'g': -@@ -1083,16 +1083,16 @@ static int getNextPcapFileFromPlaylist(u_int16_t threa +@@ -1054,16 +1054,16 @@ static int getNextPcapFileFromPlaylist(u_int16_t threa */ static void configurePcapHandle(pcap_t * pcap_handle) { diff --git a/net/ntopng/patches/patch-nDPI_example_ndpi_util_c b/net/ntopng/patches/patch-nDPI_example_ndpi_util_c index 6235d42e6fd..a62cfbf8072 100644 --- a/net/ntopng/patches/patch-nDPI_example_ndpi_util_c +++ b/net/ntopng/patches/patch-nDPI_example_ndpi_util_c @@ -1,17 +1,17 @@ -$OpenBSD: patch-nDPI_example_ndpi_util_c,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- nDPI/example/ndpi_util.c.orig Tue Apr 26 17:12:52 2016 -+++ nDPI/example/ndpi_util.c Tue Apr 26 17:13:04 2016 -@@ -612,11 +612,13 @@ void ndpi_workflow_process_packet (struct ndpi_workflo - } - break; +$OpenBSD: patch-nDPI_example_ndpi_util_c,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- nDPI/example/ndpi_util.c.orig Mon Jun 27 20:31:24 2016 ++++ nDPI/example/ndpi_util.c Sat Jul 9 12:56:31 2016 +@@ -628,11 +628,13 @@ void ndpi_workflow_process_packet (struct ndpi_workflo + } + break; +#ifdef DLT_LINUX_SLL - /* Linux Cooked Capture - 113 */ - case DLT_LINUX_SLL : - type = (packet[eth_offset+14] << 8) + packet[eth_offset+15]; - ip_offset = 16 + eth_offset; - break; + /* Linux Cooked Capture - 113 */ + case DLT_LINUX_SLL : + type = (packet[eth_offset+14] << 8) + packet[eth_offset+15]; + ip_offset = 16 + eth_offset; + break; +#endif - /* Radiotap link-layer - 127 */ - case DLT_IEEE802_11_RADIO : + /* Radiotap link-layer - 127 */ + case DLT_IEEE802_11_RADIO : diff --git a/net/ntopng/patches/patch-src_Flow_cpp b/net/ntopng/patches/patch-src_Flow_cpp index eda199aae73..a641839c9e3 100644 --- a/net/ntopng/patches/patch-src_Flow_cpp +++ b/net/ntopng/patches/patch-src_Flow_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_Flow_cpp,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- src/Flow.cpp.orig Mon Apr 25 09:27:48 2016 -+++ src/Flow.cpp Tue Apr 26 17:53:24 2016 -@@ -1634,9 +1634,9 @@ json_object* Flow::flow2json(bool partial_dump) { +$OpenBSD: patch-src_Flow_cpp,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- src/Flow.cpp.orig Mon Jun 27 20:31:18 2016 ++++ src/Flow.cpp Sat Jul 9 12:55:43 2016 +@@ -1795,9 +1795,9 @@ bool Flow::isIdleFlow() { /* *************************************** */ @@ -13,7 +13,7 @@ $OpenBSD: patch-src_Flow_cpp,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ if(deltaMS > 0) { if(stats->max_ms == 0) -@@ -1650,7 +1650,7 @@ void Flow::updatePacketStats(InterarrivalStats *stats, +@@ -1811,7 +1811,7 @@ void Flow::updatePacketStats(InterarrivalStats *stats, } } @@ -22,7 +22,7 @@ $OpenBSD: patch-src_Flow_cpp,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ } /* *************************************** */ -@@ -1669,8 +1669,8 @@ void Flow::dumpPacketStats(lua_State* vm, bool cli2srv +@@ -1830,8 +1830,8 @@ void Flow::dumpPacketStats(lua_State* vm, bool cli2srv /* *************************************** */ diff --git a/net/ntopng/patches/patch-src_Lua_cpp b/net/ntopng/patches/patch-src_Lua_cpp index 4da467d8592..70104cd0bd6 100644 --- a/net/ntopng/patches/patch-src_Lua_cpp +++ b/net/ntopng/patches/patch-src_Lua_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_Lua_cpp,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- src/Lua.cpp.orig Mon Apr 25 09:27:48 2016 -+++ src/Lua.cpp Mon Apr 25 19:49:20 2016 -@@ -3033,8 +3033,8 @@ static int ntop_generate_csrf_value(lua_State* vm) { +$OpenBSD: patch-src_Lua_cpp,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- src/Lua.cpp.orig Mon Jun 27 20:31:18 2016 ++++ src/Lua.cpp Sat Jul 9 12:55:43 2016 +@@ -3134,8 +3134,8 @@ static int ntop_generate_csrf_value(lua_State* vm) { ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); #ifdef __OpenBSD__ diff --git a/net/ntopng/patches/patch-src_NetworkInterface_cpp b/net/ntopng/patches/patch-src_NetworkInterface_cpp index 21f6605ff5a..8bbc5cd5a8a 100644 --- a/net/ntopng/patches/patch-src_NetworkInterface_cpp +++ b/net/ntopng/patches/patch-src_NetworkInterface_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_NetworkInterface_cpp,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- src/NetworkInterface.cpp.orig Tue Apr 26 17:20:12 2016 -+++ src/NetworkInterface.cpp Tue Apr 26 17:25:39 2016 -@@ -679,8 +679,8 @@ bool NetworkInterface::processPacket(const struct bpf_ +$OpenBSD: patch-src_NetworkInterface_cpp,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- src/NetworkInterface.cpp.orig Mon Jun 27 20:31:18 2016 ++++ src/NetworkInterface.cpp Sat Jul 9 12:55:43 2016 +@@ -699,8 +699,8 @@ bool NetworkInterface::processPacket(const struct bpf_ u_int16_t vlan_id, struct ndpi_iphdr *iph, struct ndpi_ipv6hdr *ip6, diff --git a/net/ntopng/patches/patch-src_Utils_cpp b/net/ntopng/patches/patch-src_Utils_cpp index 9fa1355df74..314727e0898 100644 --- a/net/ntopng/patches/patch-src_Utils_cpp +++ b/net/ntopng/patches/patch-src_Utils_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_Utils_cpp,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ ---- src/Utils.cpp.orig Tue Apr 26 17:45:12 2016 -+++ src/Utils.cpp Tue Apr 26 17:45:48 2016 -@@ -201,7 +201,19 @@ float Utils::timeval2ms(struct timeval *tv) { +$OpenBSD: patch-src_Utils_cpp,v 1.2 2016/07/09 12:14:28 sthen Exp $ +--- src/Utils.cpp.orig Mon Jun 27 20:31:18 2016 ++++ src/Utils.cpp Sat Jul 9 12:55:43 2016 +@@ -204,7 +204,19 @@ float Utils::timeval2ms(struct timeval *tv) { /* ****************************************************** */ diff --git a/net/ntopng/pkg/PLIST b/net/ntopng/pkg/PLIST index a494744e7ce..e59e6f025eb 100644 --- a/net/ntopng/pkg/PLIST +++ b/net/ntopng/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $ +@comment $OpenBSD: PLIST,v 1.2 2016/07/09 12:14:28 sthen Exp $ @newgroup _ntopng:767 @newuser _ntopng:767:_ntopng:daemon:ntopng user:/nonexistent:/sbin/nologin @extraunexec rm -rf ${LOCALSTATEDIR}/db/ntopng/* @@ -7,6 +7,7 @@ share/doc/ntopng/ share/doc/ntopng/README.FreeBSD share/doc/ntopng/README.IPv6 +share/doc/ntopng/README.LDAP share/doc/ntopng/README.SSL share/doc/ntopng/README.bridging share/doc/ntopng/README.cento @@ -24,6 +25,7 @@ share/doc/ntopng/README.pfsense share/doc/ntopng/README.redis share/doc/ntopng/README.users share/doc/ntopng/README.vagrant +share/doc/ntopng/README.valgrind share/doc/ntopng/README.windows share/doc/ntopng/README.zmq share/doc/pkg-readmes/${FULLPKGNAME} @@ -255,6 +257,7 @@ share/ntopng/httpdocs/js/pdfmake.js share/ntopng/httpdocs/js/pie-chart.js share/ntopng/httpdocs/js/prettify.js share/ntopng/httpdocs/js/rickshaw.js +share/ntopng/httpdocs/js/ripe_widget_api.js share/ntopng/httpdocs/js/sankey.js share/ntopng/httpdocs/js/sequence_sunburst.js share/ntopng/httpdocs/js/springy-ntop.js @@ -357,6 +360,7 @@ share/ntopng/scripts/lua/iface_hosts_list.lua share/ntopng/scripts/lua/iface_local_stats.lua share/ntopng/scripts/lua/iface_ndpi_stats.lua share/ntopng/scripts/lua/iface_ports_list.lua +share/ntopng/scripts/lua/iface_tcp_stats.lua share/ntopng/scripts/lua/inc/ share/ntopng/scripts/lua/inc/add_user_dialog.lua share/ntopng/scripts/lua/inc/change_user_password_form.lua @@ -412,7 +416,7 @@ share/ntopng/scripts/lua/protocols/ share/ntopng/scripts/lua/protocols/dns_aggregations.lua share/ntopng/scripts/lua/protocols/epp_aggregations.lua share/ntopng/scripts/lua/resolve_address.lua -share/ntopng/scripts/lua/set_active_interface.lua +share/ntopng/scripts/lua/runtime.lua share/ntopng/scripts/lua/set_if_prefs.lua share/ntopng/scripts/lua/sflow_tree.lua share/ntopng/scripts/lua/sflows_stats.lua