summaryrefslogtreecommitdiff
path: root/net-libs/nDPI
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /net-libs/nDPI
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'net-libs/nDPI')
-rw-r--r--net-libs/nDPI/Manifest14
-rw-r--r--net-libs/nDPI/files/nDPI-3.2-0000-Check-NULL-strings-in-ndpi_serialize_string_string.patch23
-rw-r--r--net-libs/nDPI/files/nDPI-3.2-0001-Added-fix-for-serialization-loop.patch28
-rw-r--r--net-libs/nDPI/files/nDPI-3.2-0002-Refresh-of-ndpi_netbios_name_interpret.patch74
-rw-r--r--net-libs/nDPI/files/nDPI-3.2-0003-Fixed-invalid-allocation.patch22
-rw-r--r--net-libs/nDPI/files/nDPI-3.2-0004-Fix-for-serialization-of-strings-where-the-first-element-is-a-zero-le.patch208
-rw-r--r--net-libs/nDPI/files/nDPI-3.2-0005-Fix-oob-in-kerberos-dissector.patch23
-rw-r--r--net-libs/nDPI/nDPI-3.0-r1.ebuild46
-rw-r--r--net-libs/nDPI/nDPI-3.0-r2.ebuild53
-rw-r--r--net-libs/nDPI/nDPI-3.2-r1.ebuild64
-rw-r--r--net-libs/nDPI/nDPI-3.2-r2.ebuild65
-rw-r--r--net-libs/nDPI/nDPI-9999.ebuild5
12 files changed, 4 insertions, 621 deletions
diff --git a/net-libs/nDPI/Manifest b/net-libs/nDPI/Manifest
index cd8187a33747..dc30d1f1b742 100644
--- a/net-libs/nDPI/Manifest
+++ b/net-libs/nDPI/Manifest
@@ -1,18 +1,6 @@
-AUX nDPI-3.2-0000-Check-NULL-strings-in-ndpi_serialize_string_string.patch 1041 BLAKE2B a513bcff2b9efb52a61e843c8f5d28558786db6dd3f38fc53d1c7461199ef5bfd81a4d30eb5c1279ef36979f585135c9511e4f59f93b015411cc3084fe1a7a75 SHA512 42f5efd626946ff7825be47ba9b2729216342213a1e886eb969f27a9c3757db1ac788d03592240156386c201de7457e1366df37a838da582b4f2afbc07f4f7a5
-AUX nDPI-3.2-0001-Added-fix-for-serialization-loop.patch 916 BLAKE2B 85c6f19146c2eb5b50fd524f6584566d9abe81e55b2c5d108f0022577201170ac48ee9f3240935416988cb37df90efeb12e38bc46b9428bd946da7c463d748bb SHA512 430881fcec23252aca4de4786b16abbc6845d879872560b268dcd6c5dc36b8d4f6ae6888103efcc7d4e4dd91f00c3e3e10dcf52ae5811b97e3877605ede41968
-AUX nDPI-3.2-0002-Refresh-of-ndpi_netbios_name_interpret.patch 2643 BLAKE2B be3d1a9bd632d4b1837d22248af94179debd48e4c99715553839f1f630cd0aec2ce345953d8f8fa1d01c682b6a466f565e850343541bf3a1a92d49a55d912d5b SHA512 41d849d2a1e204c82779896f5561cdc20ed1a4aa62391255bf7ef862589e1260ddd77bb44c6a9462cb3cc80d9de0aca731c8f78e3c06ca69dbead66a09b26018
-AUX nDPI-3.2-0003-Fixed-invalid-allocation.patch 794 BLAKE2B 3f8814e0c836dd0d2f05f5516154c43624a9b9cbf4a24f63a47334e808cc9e28fdc3c51d31f743dfb62fc8ca13187ed21e66122d50a03fd4d6bdaff85f49069d SHA512 2b20d6b92497dd23f72d2c486f32b749dc2e2b86547443629b57dc00aa163155eebef2d5ea123386f257a582e437f886787421ce2232be0f7d35853b6997cd4d
-AUX nDPI-3.2-0004-Fix-for-serialization-of-strings-where-the-first-element-is-a-zero-le.patch 6861 BLAKE2B a5e3c17b895167da57ec472444bb5933eca44120c4281a455e494c1ab62806619f3eb860ba1deaded8049a03c4953d2c4c8951187c1aabddfc3ae7d5e8bebc95 SHA512 173ff8a9568cf2e56e0ea1a271de0090f02fd2a0bc17be6e02b1bfed0327ddc78014fbe6f2fc5850eb5a2141f133cdc70f2ce614ff5f6e820cb577cfdb8d5513
-AUX nDPI-3.2-0005-Fix-oob-in-kerberos-dissector.patch 1063 BLAKE2B 75774a72b8d9b6814cf5a7b9f68bdabd07ec1703805807f6e4c46bc1392d0044b7513019e35a04b0209bcc34088bdb49b98f1c6eba72162a7c5665d14c3397a2 SHA512 68f17871e32de9abb1f5fa1e73d5ffbf29e906ee8088d28c764d140833c64ab41ec1fe97f0b8a6d5ccdc65c9f7beac31500508303f74dedf5ab84327a2a56c86
AUX nDPI-3.4-configure-fail-libcap.patch 911 BLAKE2B 6f376334d7c53a2a6c6a0e5babea2c6e2c1c744159b9113e5346e4fd312e42487655f728ca838d32e26a681287b795f0f9236fc70db9f626dbf1526e4c654bcf SHA512 638a1c0a791459f8cdcbdcc71ff16eee8ca43a1d1fd4346b61f30b127b5bd5047f7bf86c87c23784001588b029e35a633bd73423066839bffac754162a86f4bd
AUX nDPI-3.4-fix-oob-in-kerberos-dissector.patch 882 BLAKE2B 189f3bbd5b209d7b7ea8d1febd06901dea20acc7153fc8ece674f7f67c2217e946ae519af77b9553e8938f7bd90e7c56e1c68849c78726f828d0fec9cbf80f86 SHA512 1aa8201959872163cc4864745149700982ef0188e4a341b0a33e9eb0b1afdf5d9dc244fad070b32ceb0fce7b9dc42622cd4e7a327a42ff24e10ce0211d3da984
-DIST nDPI-3.0.tar.gz 26902734 BLAKE2B 79380ce5138b8ba99169ce3a2afeaa2a2bcded9bc7834d32af6911e9cee60395613a390d2d5d0530b9ff9263ad707e78f49d35098428c66a9c95a98aee2d8df8 SHA512 74c4a41201e809b476f4c23b99c2391b7bcbc76507a11261d216caf2350db8fd4ae3dac69d1d2179b12217901da1e04676aeca05d3a8e63d1a162469b33ab4c0
-DIST nDPI-3.2.tar.gz 29586049 BLAKE2B 4ea7f1cf39b5363b724c2db84c006de2f0e05ea275586241c3e1b9a53681f1da83dc752e69d379d6b8c8bcf8b15b146e8a2de127931d3b2061112aef297f7d79 SHA512 bf3a6e66479110b8e1a51a3b66cc0a85aef98af455f2895a75fe2a8b06a9fb72a4dca3d4bbfa6f44959c5043c038927a1a8acb312e881d4e2bb544dc84b6eea8
DIST nDPI-3.4.tar.gz 37976087 BLAKE2B 49e25586671a91278d90775c3dbc881ce4ca9ae4afd3108b1caff3b0d38251808bcd52ead253f451474195994fbf94658f70241acedb23c35a475df3b15c4a20 SHA512 ed5a22b6ddc14ad707a18a0bd96746c1df489969faaa42016fa9aad8d414fc4ee303b96cac15c3ba86f484a80a0aaa2dd1be5f92be672912e0e0d30da4bdad4c
-EBUILD nDPI-3.0-r1.ebuild 966 BLAKE2B c0b61a5243af862d1373a734ba8f0ffe8f95c40bb0ffac40dc72b1bca0a704eece2893d4c8d876744ee298a05243b21490f89218d9c493f7cdcd4ae4c3da2527 SHA512 8f0e6004fea392c1573477976b83de81e2bb3467bbcf4ffa18817f79c5b1cca00a6c35fbeccc753e41edbf7a8d15d1dd74bd68bd2af9d4726265c60bf8a3ebbe
-EBUILD nDPI-3.0-r2.ebuild 1176 BLAKE2B 57e01bdf62c55c2c69f1bd64599a1838eb050371ac0f18e5beca7d453840e1abee0aea3cce222ce044fb7f9a084e5030459164eac680af892b897fdc8f1c1d10 SHA512 c82c47552699b3feaff9e2007fa357c0eded3175b28fa5817d64c35283fed2e9ed7499a5ac0944664243a859fcee4e41db0d1382eb8c0cd52bafec3388702724
-EBUILD nDPI-3.2-r1.ebuild 1750 BLAKE2B efc6ab0d48a8d5db4237d1f8b59705c9e489cfc2fafd431339c9a2c7a90ae3e9a28c9ea17313f34ed1912f93be7c9d32ce2528ee40960fbf354e6fc807b3ab2b SHA512 cc1662b4a436d51e586ebc67b4c4c88440e85203586a2fddfcb6c9d6593969665a6890b4b6211e717b4bbf4cd80230834af0a1dd1a8f1c14e6df63799f0c507e
-EBUILD nDPI-3.2-r2.ebuild 1816 BLAKE2B 1ff85ae67f95fc476ee4ec7c72d68b22f5bc559ac4e791297b3daff664f7fc2c85a8e432f69e6d7e107accc5dea99183600233f65bd2f641decd40d69697208a SHA512 a014ffa4d3507fa55fadf149b832a1f02adbb3ce8b148b24c46cec186a680f2c04c7a79b78c4e5cdddbf13d3e9be68acbadd428c15a07c185e389375e6792028
EBUILD nDPI-3.4.ebuild 1542 BLAKE2B c33be0c27e0521e4b75b10a0fd49b8f208120fff45653c9f9da4f8320c7d31b25df5374e33fb8517551bdda081029eb14e5db2278fdaa1c6ab28ed45e13ce9de SHA512 e3825dab00f2e399df07f6753f2e53900d5caaf9f41da325f30ee4c2ed7669f08278b2b96e12c06fad6057eae4587c909de3222b50982f63afb26cec7e206e11
-EBUILD nDPI-9999.ebuild 1293 BLAKE2B d69406384a02ff5fa67aabcf6d97183b362b4fcf7bfb06fa4ba95e53469007305e197459e9250b4be800a89506a3542df3abf07ab60aef3d9aab93bcca5daa0d SHA512 6def195805ee8aff6339bb0a38a098048a95391b6aeed6319946d550e79aac36251d23d4401854b043e7f46003490d15736b67b1c3af044ffcc11b939bc38ff3
+EBUILD nDPI-9999.ebuild 1285 BLAKE2B 7f9f9faabe4713bf484bdbb0b91ff2f78831f74943627c67a550241cf7f120a65b12bd18c89fbbfb1bc052b613ef6c96d5bdafd2ecde3d5803c21b4b9edaa237 SHA512 796059fe7321238a0b5aafa7db7b439c4bd1b8f4b7c0a3d865a453a1ecbdf2a7d535fc88ff0b6eab1cda6a0758221fe9da71cc9e2cd14e889f14cf3eb41fa89b
MISC metadata.xml 292 BLAKE2B b19942da80630c9c576f1ee8c3a6d150dcdc2fa587b10cf175d0eb440c7a2d07224d795e84dbc54647822524598399c4e483e72cd359df926fb76d2909729383 SHA512 16a16e996a75b5a2833aa6cb54df6d8ee9c643987df0addde6c21e01fdf9a6c68c804048e6fa3ea8ad583c654d786b59246b0d7c176a3e234e6de32b066dc5cd
diff --git a/net-libs/nDPI/files/nDPI-3.2-0000-Check-NULL-strings-in-ndpi_serialize_string_string.patch b/net-libs/nDPI/files/nDPI-3.2-0000-Check-NULL-strings-in-ndpi_serialize_string_string.patch
deleted file mode 100644
index db26330d699f..000000000000
--- a/net-libs/nDPI/files/nDPI-3.2-0000-Check-NULL-strings-in-ndpi_serialize_string_string.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 15bb7ae4339cc2a4a626a52fcf49abfb1d237d65 Mon Sep 17 00:00:00 2001
-From: Alfredo Cardigliano <alfredo.cardigliano@gmail.com>
-Date: Wed, 26 Feb 2020 09:55:24 +0100
-Subject: [PATCH] Check NULL strings in ndpi_serialize_string_string
-
----
- src/lib/ndpi_serializer.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/lib/ndpi_serializer.c b/src/lib/ndpi_serializer.c
-index 05b346bb..9a3cd0bd 100644
---- a/src/lib/ndpi_serializer.c
-+++ b/src/lib/ndpi_serializer.c
-@@ -1270,7 +1270,8 @@ int ndpi_serialize_string_binary(ndpi_serializer *_serializer,
- /* Key is a string, value is a string (strlen is used to compute the len) */
- int ndpi_serialize_string_string(ndpi_serializer *_serializer,
- const char *key, const char *_value) {
-- return(ndpi_serialize_binary_binary(_serializer, key, strlen(key), _value, strlen(_value)));
-+ const char *value = _value ? _value : "";
-+ return(ndpi_serialize_binary_binary(_serializer, key, strlen(key), value, strlen(value)));
- }
-
- /* ********************************** */
diff --git a/net-libs/nDPI/files/nDPI-3.2-0001-Added-fix-for-serialization-loop.patch b/net-libs/nDPI/files/nDPI-3.2-0001-Added-fix-for-serialization-loop.patch
deleted file mode 100644
index c2fbf28383fa..000000000000
--- a/net-libs/nDPI/files/nDPI-3.2-0001-Added-fix-for-serialization-loop.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 7b2f89ef25eafdd76e8b540f1d8ba1fdec185ef9 Mon Sep 17 00:00:00 2001
-From: Luca Deri <deri@ntop.org>
-Date: Fri, 20 Mar 2020 18:05:52 +0100
-Subject: [PATCH] Added fix for serialization loop
-
----
- src/lib/ndpi_serializer.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/ndpi_serializer.c b/src/lib/ndpi_serializer.c
-index 9a3cd0bd..80221005 100644
---- a/src/lib/ndpi_serializer.c
-+++ b/src/lib/ndpi_serializer.c
-@@ -1054,8 +1054,12 @@ int ndpi_serialize_string_uint32_format(ndpi_serializer *_serializer,
- */
-
- return(ndpi_serialize_string_uint32(_serializer, key, value));
-- } else
-- return(ndpi_serialize_string_uint32_format(_serializer, key, value, format));
-+ } else {
-+ char buf[16];
-+
-+ snprintf(buf, sizeof(buf), format, value);
-+ return(ndpi_serialize_string_string(_serializer, key, buf));
-+ }
- }
-
- /* ********************************** */
diff --git a/net-libs/nDPI/files/nDPI-3.2-0002-Refresh-of-ndpi_netbios_name_interpret.patch b/net-libs/nDPI/files/nDPI-3.2-0002-Refresh-of-ndpi_netbios_name_interpret.patch
deleted file mode 100644
index 69aa892d2d11..000000000000
--- a/net-libs/nDPI/files/nDPI-3.2-0002-Refresh-of-ndpi_netbios_name_interpret.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From e4512dbcb9e1db0500290b712257e501d1440d71 Mon Sep 17 00:00:00 2001
-From: Luca Deri <deri@ntop.org>
-Date: Tue, 24 Mar 2020 12:18:15 +0100
-Subject: [PATCH] Refresh of ndpi_netbios_name_interpret
-
----
- src/include/ndpi_main.h | 2 +-
- src/lib/protocols/netbios.c | 15 +++++++--------
- 2 files changed, 8 insertions(+), 9 deletions(-)
-
-diff --git a/src/include/ndpi_main.h b/src/include/ndpi_main.h
-index c909adc7..9335f215 100644
---- a/src/include/ndpi_main.h
-+++ b/src/include/ndpi_main.h
-@@ -132,7 +132,7 @@ extern "C" {
- u_int16_t** tcp_master_proto,
- u_int16_t** udp_master_proto);
- #/* NDPI_PROTOCOL_NETBIOS */
-- int ndpi_netbios_name_interpret(char *in, char *out, u_int out_len);
-+ int ndpi_netbios_name_interpret(char *in, size_t inlen, char *out, u_int out_len);
-
- #ifdef NDPI_ENABLE_DEBUG_MESSAGES
- void ndpi_debug_get_last_log_function_line(struct ndpi_detection_module_struct *ndpi_struct,
-diff --git a/src/lib/protocols/netbios.c b/src/lib/protocols/netbios.c
-index 19cffeb8..1c65b185 100644
---- a/src/lib/protocols/netbios.c
-+++ b/src/lib/protocols/netbios.c
-@@ -35,17 +35,17 @@ struct netbios_header {
- };
-
- /* The function below has been inherited by tcpdump */
--int ndpi_netbios_name_interpret(char *in, char *out, u_int out_len) {
-+int ndpi_netbios_name_interpret(char *in, size_t inlen, char *out, u_int out_len) {
- int ret = 0, len;
- char *b;
--
-+
- len = (*in++)/2;
- b = out;
- *out = 0;
-
-- if(len > (out_len-1) || len < 1)
-- return(-1);
--
-+ if(len > (out_len-1) || len < 1 || 2*len > inlen)
-+ return(-1);
-+
- while (len--) {
- if(in[0] < 'A' || in[0] > 'P' || in[1] < 'A' || in[1] > 'P') {
- *out = 0;
-@@ -53,7 +53,7 @@ int ndpi_netbios_name_interpret(char *in, char *out, u_int out_len) {
- }
-
- *out = ((in[0]-'A')<<4) + (in[1]-'A');
--
-+
- in += 2;
-
- if(isprint(*out))
-@@ -69,13 +69,12 @@ int ndpi_netbios_name_interpret(char *in, char *out, u_int out_len) {
- return(ret);
- }
-
--
- static void ndpi_int_netbios_add_connection(struct ndpi_detection_module_struct
- *ndpi_struct, struct ndpi_flow_struct *flow) {
- char name[64];
- u_int off = flow->packet.payload[12] == 0x20 ? 12 : 14;
-
-- if(ndpi_netbios_name_interpret((char*)&flow->packet.payload[off], name, sizeof(name)) > 0)
-+ if(ndpi_netbios_name_interpret((char*)&flow->packet.payload[off], flow->packet.payload_packet_len - off, name, sizeof(name)) > 0)
- snprintf((char*)flow->host_server_name, sizeof(flow->host_server_name)-1, "%s", name);
-
- ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_NETBIOS, NDPI_PROTOCOL_UNKNOWN);
diff --git a/net-libs/nDPI/files/nDPI-3.2-0003-Fixed-invalid-allocation.patch b/net-libs/nDPI/files/nDPI-3.2-0003-Fixed-invalid-allocation.patch
deleted file mode 100644
index ba8353eef98f..000000000000
--- a/net-libs/nDPI/files/nDPI-3.2-0003-Fixed-invalid-allocation.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From cd4f8051ddfd1bae53393174462c823cf5e15ec0 Mon Sep 17 00:00:00 2001
-From: Luca Deri <deri@ntop.org>
-Date: Tue, 24 Mar 2020 13:39:12 +0100
-Subject: [PATCH] Fixed invalid allocation
-
----
- src/lib/protocols/ssh.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/lib/protocols/ssh.c b/src/lib/protocols/ssh.c
-index f3b50b60..6813b2a9 100644
---- a/src/lib/protocols/ssh.c
-+++ b/src/lib/protocols/ssh.c
-@@ -294,7 +294,7 @@ static void ndpi_search_ssh_tcp(struct ndpi_detection_module_struct *ndpi_struct
- ndpi_MD5_CTX ctx;
-
- if(msgcode == 20 /* key exchange init */) {
-- char *hassh_buf = calloc(packet->payload_packet_len, sizeof(char));
-+ char *hassh_buf = ndpi_calloc(packet->payload_packet_len, sizeof(char));
- u_int i, len;
-
- #ifdef SSH_DEBUG
diff --git a/net-libs/nDPI/files/nDPI-3.2-0004-Fix-for-serialization-of-strings-where-the-first-element-is-a-zero-le.patch b/net-libs/nDPI/files/nDPI-3.2-0004-Fix-for-serialization-of-strings-where-the-first-element-is-a-zero-le.patch
deleted file mode 100644
index 04f264d52ddd..000000000000
--- a/net-libs/nDPI/files/nDPI-3.2-0004-Fix-for-serialization-of-strings-where-the-first-element-is-a-zero-le.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-From 60e3ac6b39cb25c974785b8ccc49edaae458a891 Mon Sep 17 00:00:00 2001
-From: Luca Deri <deri@ntop.org>
-Date: Fri, 3 Apr 2020 15:31:23 +0200
-Subject: [PATCH] Fix for serialization of strings where the first element is a
- zero len string
-
----
- src/include/ndpi_typedefs.h | 10 ++++++----
- src/lib/ndpi_serializer.c | 36 +++++++++++++++++++++++++++++++-----
- 2 files changed, 37 insertions(+), 9 deletions(-)
-
-diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
-index 98b8ccf8..2c513e26 100644
---- a/src/include/ndpi_typedefs.h
-+++ b/src/include/ndpi_typedefs.h
-@@ -1446,10 +1446,12 @@ typedef enum {
- #define NDPI_SERIALIZER_DEFAULT_BUFFER_SIZE 8192
- #define NDPI_SERIALIZER_DEFAULT_BUFFER_INCR 1024
-
--#define NDPI_SERIALIZER_STATUS_COMMA (1 << 0)
--#define NDPI_SERIALIZER_STATUS_ARRAY (1 << 1)
--#define NDPI_SERIALIZER_STATUS_EOR (1 << 2)
--#define NDPI_SERIALIZER_STATUS_SOB (1 << 3)
-+#define NDPI_SERIALIZER_STATUS_COMMA (1 << 0)
-+#define NDPI_SERIALIZER_STATUS_ARRAY (1 << 1)
-+#define NDPI_SERIALIZER_STATUS_EOR (1 << 2)
-+#define NDPI_SERIALIZER_STATUS_SOB (1 << 3)
-+#define NDPI_SERIALIZER_STATUS_NOT_EMPTY (1 << 4)
-+
-
- typedef struct {
- u_int32_t flags;
-diff --git a/src/lib/ndpi_serializer.c b/src/lib/ndpi_serializer.c
-index 80221005..57c61604 100644
---- a/src/lib/ndpi_serializer.c
-+++ b/src/lib/ndpi_serializer.c
-@@ -43,6 +43,14 @@
-
- /* ********************************** */
-
-+static u_int8_t ndpi_serialize_is_not_empty(ndpi_serializer *_serializer) {
-+ ndpi_private_serializer *serializer = (ndpi_private_serializer*)_serializer;
-+
-+ return(((serializer->status.flags & NDPI_SERIALIZER_STATUS_NOT_EMPTY) == NDPI_SERIALIZER_STATUS_NOT_EMPTY) ? 1 : 0);
-+}
-+
-+/* ********************************** */
-+
- static u_int64_t ndpi_htonll(u_int64_t v) {
- union { u_int32_t lv[2]; u_int64_t llv; } u;
-
-@@ -442,14 +450,17 @@ int ndpi_serialize_end_of_record(ndpi_serializer *_serializer) {
- if(!(serializer->status.flags & NDPI_SERIALIZER_STATUS_ARRAY)) {
- serializer->buffer[0] = '[';
- serializer->status.size_used += snprintf((char *) &serializer->buffer[serializer->status.size_used],
-- buff_diff, "]");
-+ buff_diff, "]");
- }
-+
- serializer->status.flags |= NDPI_SERIALIZER_STATUS_ARRAY | NDPI_SERIALIZER_STATUS_EOR;
- serializer->status.flags &= ~NDPI_SERIALIZER_STATUS_COMMA;
- } else {
- serializer->buffer[serializer->status.size_used++] = ndpi_serialization_end_of_record;
- }
-
-+ serializer->status.flags &= ~NDPI_SERIALIZER_STATUS_NOT_EMPTY;
-+
- return(0);
- }
-
-@@ -556,6 +567,7 @@ int ndpi_serialize_uint32_uint32(ndpi_serializer *_serializer,
- serializer->buffer[type_offset] = type;
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -607,6 +619,7 @@ int ndpi_serialize_uint32_uint64(ndpi_serializer *_serializer,
- }
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -660,6 +673,7 @@ int ndpi_serialize_uint32_int32(ndpi_serializer *_serializer,
- serializer->buffer[type_offset] = type;
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -713,6 +727,7 @@ int ndpi_serialize_uint32_int64(ndpi_serializer *_serializer,
- }
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -761,6 +776,7 @@ int ndpi_serialize_uint32_float(ndpi_serializer *_serializer,
- serializer->buffer[type_offset] = type;
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -811,6 +827,7 @@ static int ndpi_serialize_uint32_binary(ndpi_serializer *_serializer,
- serializer->buffer[type_offset] = type;
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -851,6 +868,7 @@ int ndpi_serialize_uint32_boolean(ndpi_serializer *_serializer,
- value ? "true" : "false");
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -908,6 +926,8 @@ static int ndpi_serialize_binary_int32(ndpi_serializer *_serializer,
- }
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
-+
- return(0);
- }
-
-@@ -967,6 +987,7 @@ int ndpi_serialize_binary_int64(ndpi_serializer *_serializer,
- }
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -1030,6 +1051,7 @@ static int ndpi_serialize_binary_uint32(ndpi_serializer *_serializer,
- }
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -1056,7 +1078,7 @@ int ndpi_serialize_string_uint32_format(ndpi_serializer *_serializer,
- return(ndpi_serialize_string_uint32(_serializer, key, value));
- } else {
- char buf[16];
--
-+
- snprintf(buf, sizeof(buf), format, value);
- return(ndpi_serialize_string_string(_serializer, key, buf));
- }
-@@ -1111,6 +1133,7 @@ static int ndpi_serialize_binary_uint64(ndpi_serializer *_serializer,
- }
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -1174,6 +1197,7 @@ static int ndpi_serialize_binary_float(ndpi_serializer *_serializer,
- ndpi_serialize_single_float(serializer, value);
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -1232,8 +1256,8 @@ static int ndpi_serialize_binary_raw(ndpi_serializer *_serializer,
- ndpi_serialize_json_post(_serializer);
- } else if(serializer->fmt == ndpi_serialization_format_csv) {
- serializer->status.size_used += snprintf((char *) &serializer->buffer[serializer->status.size_used], buff_diff,
-- "%s%s", (serializer->status.size_used > 0) ? serializer->csv_separator : "",
-- value);
-+ "%s%s", ndpi_serialize_is_not_empty(_serializer) ? serializer->csv_separator : "",
-+ value);
- } else {
- serializer->buffer[serializer->status.size_used++] = (ndpi_serialization_string << 4) | ndpi_serialization_string;
-
-@@ -1241,6 +1265,7 @@ static int ndpi_serialize_binary_raw(ndpi_serializer *_serializer,
- ndpi_serialize_single_string(serializer, value, vlen);
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
-@@ -1320,10 +1345,11 @@ int ndpi_serialize_string_boolean(ndpi_serializer *_serializer,
- ndpi_serialize_json_post(_serializer);
- } else if(serializer->fmt == ndpi_serialization_format_csv) {
- serializer->status.size_used += snprintf((char *) &serializer->buffer[serializer->status.size_used], buff_diff,
-- "%s%s", (serializer->status.size_used > 0) ? serializer->csv_separator : "",
-+ "%s%s", ndpi_serialize_is_not_empty(_serializer) ? serializer->csv_separator : "",
- value ? "true" : "false");
- }
-
-+ serializer->status.flags |= NDPI_SERIALIZER_STATUS_NOT_EMPTY;
- return(0);
- }
-
diff --git a/net-libs/nDPI/files/nDPI-3.2-0005-Fix-oob-in-kerberos-dissector.patch b/net-libs/nDPI/files/nDPI-3.2-0005-Fix-oob-in-kerberos-dissector.patch
deleted file mode 100644
index cd34875890cd..000000000000
--- a/net-libs/nDPI/files/nDPI-3.2-0005-Fix-oob-in-kerberos-dissector.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 6735bb35c65c60a777557c3277546d5801729995 Mon Sep 17 00:00:00 2001
-From: Alfredo Cardigliano <alfredo.cardigliano@gmail.com>
-Date: Tue, 21 Jul 2020 00:46:37 +0200
-Subject: [PATCH] Fix oob in kerberos dissector
-
----
- src/lib/protocols/kerberos.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/lib/protocols/kerberos.c b/src/lib/protocols/kerberos.c
-index 2bacbf51..2ed824fa 100644
---- a/src/lib/protocols/kerberos.c
-+++ b/src/lib/protocols/kerberos.c
-@@ -185,7 +185,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(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
diff --git a/net-libs/nDPI/nDPI-3.0-r1.ebuild b/net-libs/nDPI/nDPI-3.0-r1.ebuild
deleted file mode 100644
index 42766ed5abf6..000000000000
--- a/net-libs/nDPI/nDPI-3.0-r1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools multilib
-
-DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
-HOMEPAGE="https://www.ntop.org/"
-SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0/$(ver_cut 1)"
-KEYWORDS="~amd64 ~x86"
-IUSE="static-libs"
-
-DEPEND="
- dev-libs/json-c:=
- net-libs/libpcap
-"
-RDEPEND="
- ${DEPEND}
-"
-
-src_prepare() {
- sed \
- -e "s/@NDPI_MAJOR@/$(ver_cut 1)/g" \
- -e "s/@NDPI_MINOR@/$(ver_cut 2)/g" \
- -e "s/@NDPI_PATCH@/$(ver_cut 3)/g" \
- -e "s/@NDPI_VERSION_SHORT@/${PV}/g" \
- < "${S}/configure.seed" \
- > "${S}/configure.ac" || die
-
- sed -i \
- -e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir = \${prefix}/$(get_libdir)%" \
- src/lib/Makefile.in || die
-
- default
- eautoreconf
-}
-
-src_install() {
- default
- if ! use static-libs; then
- rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die
- fi
-}
diff --git a/net-libs/nDPI/nDPI-3.0-r2.ebuild b/net-libs/nDPI/nDPI-3.0-r2.ebuild
deleted file mode 100644
index 50396b2d9db3..000000000000
--- a/net-libs/nDPI/nDPI-3.0-r2.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools multilib
-
-DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
-HOMEPAGE="https://www.ntop.org/"
-SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0/$(ver_cut 1)"
-KEYWORDS="~amd64 ~x86"
-IUSE="static-libs"
-
-DEPEND="
- dev-libs/json-c:=
- net-libs/libpcap
-"
-RDEPEND="
- ${DEPEND}
-"
-
-src_prepare() {
- # Taken from autogen.sh (bug #704074):
- sed \
- -e "s/@NDPI_MAJOR@/$(ver_cut 1)/g" \
- -e "s/@NDPI_MINOR@/$(ver_cut 2)/g" \
- -e "s/@NDPI_PATCH@/$(ver_cut 3)/g" \
- -e "s/@NDPI_VERSION_SHORT@/${PV}/g" \
- < "${S}/configure.seed" \
- > "${S}/configure.ac" || die
-
- sed -i \
- -e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir = \${prefix}/$(get_libdir)%" \
- src/lib/Makefile.in || die
-
- default
- eautoreconf
-
- # Taken from autogen.sh (bug #704074):
- sed -i \
- -e "s/#define PACKAGE/#define NDPI_PACKAGE/g" \
- -e "s/#define VERSION/#define NDPI_VERSION/g" \
- configure || die
-}
-
-src_install() {
- default
- if ! use static-libs; then
- rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die
- fi
-}
diff --git a/net-libs/nDPI/nDPI-3.2-r1.ebuild b/net-libs/nDPI/nDPI-3.2-r1.ebuild
deleted file mode 100644
index a83b9c1dce9c..000000000000
--- a/net-libs/nDPI/nDPI-3.2-r1.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools multilib
-
-DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
-HOMEPAGE="https://www.ntop.org/"
-SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0/$(ver_cut 1)"
-KEYWORDS="~amd64 ~x86"
-IUSE="static-libs"
-
-DEPEND="
- dev-libs/json-c:=
- net-libs/libpcap
-"
-RDEPEND="
- ${DEPEND}
-"
-PATCHES=(
- "${FILESDIR}"/${PN}-3.2-0000-Check-NULL-strings-in-ndpi_serialize_string_string.patch
- "${FILESDIR}"/${PN}-3.2-0001-Added-fix-for-serialization-loop.patch
- "${FILESDIR}"/${PN}-3.2-0002-Refresh-of-ndpi_netbios_name_interpret.patch
- "${FILESDIR}"/${PN}-3.2-0003-Fixed-invalid-allocation.patch
- "${FILESDIR}"/${PN}-3.2-0004-Fix-for-serialization-of-strings-where-the-first-element-is-a-zero-le.patch
-)
-
-src_prepare() {
- eval $(grep '^NDPI_MAJOR=' autogen.sh)
- eval $(grep '^NDPI_MINOR=' autogen.sh)
- eval $(grep '^NDPI_PATCH=' autogen.sh)
- NDPI_VERSION_SHORT="${NDPI_MAJOR}.${NDPI_MINOR}.${NDPI_PATCH}"
-
- sed \
- -e "s/@NDPI_MAJOR@/${NDPI_MAJOR}/g" \
- -e "s/@NDPI_MINOR@/${NDPI_MINOR}/g" \
- -e "s/@NDPI_PATCH@/${NDPI_PATCH}/g" \
- -e "s/@NDPI_VERSION_SHORT@/${NDPI_VERSION_SHORT}/g" \
- < "${S}/configure.seed" \
- > "${S}/configure.ac" || die
-
- sed -i \
- -e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir = \${prefix}/$(get_libdir)%" \
- src/lib/Makefile.in || die
-
- default
- eautoreconf
-
- # Taken from autogen.sh (bug #704074):
- sed -i \
- -e "s/#define PACKAGE/#define NDPI_PACKAGE/g" \
- -e "s/#define VERSION/#define NDPI_VERSION/g" \
- configure || die
-}
-
-src_install() {
- default
- if ! use static-libs; then
- rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die
- fi
-}
diff --git a/net-libs/nDPI/nDPI-3.2-r2.ebuild b/net-libs/nDPI/nDPI-3.2-r2.ebuild
deleted file mode 100644
index 12a23bb316ae..000000000000
--- a/net-libs/nDPI/nDPI-3.2-r2.ebuild
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools multilib
-
-DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
-HOMEPAGE="https://www.ntop.org/"
-SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0/$(ver_cut 1)"
-KEYWORDS="~amd64 ~x86"
-IUSE="static-libs"
-
-DEPEND="
- dev-libs/json-c:=
- net-libs/libpcap
-"
-RDEPEND="
- ${DEPEND}
-"
-PATCHES=(
- "${FILESDIR}"/${PN}-3.2-0000-Check-NULL-strings-in-ndpi_serialize_string_string.patch
- "${FILESDIR}"/${PN}-3.2-0001-Added-fix-for-serialization-loop.patch
- "${FILESDIR}"/${PN}-3.2-0002-Refresh-of-ndpi_netbios_name_interpret.patch
- "${FILESDIR}"/${PN}-3.2-0003-Fixed-invalid-allocation.patch
- "${FILESDIR}"/${PN}-3.2-0004-Fix-for-serialization-of-strings-where-the-first-element-is-a-zero-le.patch
- "${FILESDIR}"/${PN}-3.2-0005-Fix-oob-in-kerberos-dissector.patch
-)
-
-src_prepare() {
- eval $(grep '^NDPI_MAJOR=' autogen.sh)
- eval $(grep '^NDPI_MINOR=' autogen.sh)
- eval $(grep '^NDPI_PATCH=' autogen.sh)
- NDPI_VERSION_SHORT="${NDPI_MAJOR}.${NDPI_MINOR}.${NDPI_PATCH}"
-
- sed \
- -e "s/@NDPI_MAJOR@/${NDPI_MAJOR}/g" \
- -e "s/@NDPI_MINOR@/${NDPI_MINOR}/g" \
- -e "s/@NDPI_PATCH@/${NDPI_PATCH}/g" \
- -e "s/@NDPI_VERSION_SHORT@/${NDPI_VERSION_SHORT}/g" \
- < "${S}/configure.seed" \
- > "${S}/configure.ac" || die
-
- sed -i \
- -e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir = \${prefix}/$(get_libdir)%" \
- src/lib/Makefile.in || die
-
- default
- eautoreconf
-
- # Taken from autogen.sh (bug #704074):
- sed -i \
- -e "s/#define PACKAGE/#define NDPI_PACKAGE/g" \
- -e "s/#define VERSION/#define NDPI_VERSION/g" \
- configure || die
-}
-
-src_install() {
- default
- if ! use static-libs; then
- rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die
- fi
-}
diff --git a/net-libs/nDPI/nDPI-9999.ebuild b/net-libs/nDPI/nDPI-9999.ebuild
index 6e8aa6700933..bd4ac3459b84 100644
--- a/net-libs/nDPI/nDPI-9999.ebuild
+++ b/net-libs/nDPI/nDPI-9999.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools git-r3 multilib
+
+inherit autotools git-r3
DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
HOMEPAGE="https://www.ntop.org/"