public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nDPI/, net-libs/nDPI/files/
Date: Thu,  5 Nov 2020 14:08:08 +0000 (UTC)	[thread overview]
Message-ID: <1604585281.75f0ee948825fc1dd8060a4480a0dd5872424313.sam@gentoo> (raw)

commit:     75f0ee948825fc1dd8060a4480a0dd5872424313
Author:     John Helmert III <jchelmert3 <AT> posteo <DOT> net>
AuthorDate: Wed Nov  4 07:09:03 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov  5 14:08:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75f0ee94

net-libs/nDPI: bump to 3.4

Bug: https://bugs.gentoo.org/719084
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: John Helmert III <jchelmert3 <AT> posteo.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/nDPI/Manifest                             |  1 +
 .../nDPI-3.4-fix-oob-in-kerberos-dissector.patch   | 16 ++++++
 net-libs/nDPI/nDPI-3.4.ebuild                      | 63 ++++++++++++++++++++++
 3 files changed, 80 insertions(+)

diff --git a/net-libs/nDPI/Manifest b/net-libs/nDPI/Manifest
index ff887adc5eb..11430d2ded9 100644
--- a/net-libs/nDPI/Manifest
+++ b/net-libs/nDPI/Manifest
@@ -3,3 +3,4 @@ DIST nDPI-2.2.tar.gz 19937173 BLAKE2B a00287d5901487f7e56d7aeab7dcb357c0eb6348be
 DIST nDPI-2.8.tar.gz 19754226 BLAKE2B c112ae2d9fff872f116a23bbffe7bca39a5c876346b4e41ef503934301f39413517fce169a37a766ffae16b0cb1ee81d96573ffa1ee2519d295dfb32cc1f115e SHA512 aae757047810bbc32700ecf7ac2e5df4b93528021a50da4a0b83865a5248dfca8b1643c75aa7eeb6eac4f155638d45666db487318b2be9adb2f3412cb8ec8497
 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

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 00000000000..7e8f381cdea
--- /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

diff --git a/net-libs/nDPI/nDPI-3.4.ebuild b/net-libs/nDPI/nDPI-3.4.ebuild
new file mode 100644
index 00000000000..39a1a4c8a57
--- /dev/null
+++ b/net-libs/nDPI/nDPI-3.4.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+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="LGPL-3+"
+SLOT="0/$(ver_cut 1)"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-libs/json-c:=
+	net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.4-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" \
+		-e "s/@FUZZY@//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
+	rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die
+}
+
+src_test() {
+	pushd tests || die
+	./do.sh || die "Failed tests"
+	./do-unit.sh || die "Failed tests"
+	popd || die
+}


             reply	other threads:[~2020-11-05 14:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 14:08 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-13 13:14 [gentoo-commits] repo/gentoo:master commit in: net-libs/nDPI/, net-libs/nDPI/files/ John Helmert III
2020-11-05 14:08 Sam James
2020-11-05 14:08 Sam James
2020-05-16 11:49 Jeroen Roovers
2019-08-20  5:41 Slawek Lis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1604585281.75f0ee948825fc1dd8060a4480a0dd5872424313.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox