summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2012-03-03 15:31:46 +0000
committerPacho Ramos <pacho@gentoo.org>2012-03-03 15:31:46 +0000
commit060e9ebe65f42800af840bdc7ff2a66ee70568c8 (patch)
treef154cb1e7f28467972df75db8d143c93670dcf16 /net-misc/l7-filter-userspace
parentarm stable, bug #404179 (diff)
downloadgentoo-2-060e9ebe65f42800af840bdc7ff2a66ee70568c8.tar.gz
gentoo-2-060e9ebe65f42800af840bdc7ff2a66ee70568c8.tar.bz2
gentoo-2-060e9ebe65f42800af840bdc7ff2a66ee70568c8.zip
Include fixes from debian and ppc/arm compatibility, bug #329397 (by Gavin Pryke).
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/l7-filter-userspace')
-rw-r--r--net-misc/l7-filter-userspace/ChangeLog12
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch21
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-map-access-threadsafe.patch55
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-pattern-loading-leak.patch10
-rw-r--r--net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild21
5 files changed, 108 insertions, 11 deletions
diff --git a/net-misc/l7-filter-userspace/ChangeLog b/net-misc/l7-filter-userspace/ChangeLog
index 01a3b6b5da3c..6e8246ce89f0 100644
--- a/net-misc/l7-filter-userspace/ChangeLog
+++ b/net-misc/l7-filter-userspace/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-misc/l7-filter-userspace
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/ChangeLog,v 1.12 2011/07/20 14:54:17 pacho Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/ChangeLog,v 1.13 2012/03/03 15:31:46 pacho Exp $
+
+ 03 Mar 2012; Pacho Ramos <pacho@gentoo.org>
+ +files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch,
+ +files/l7-filter-userspace-0.11-map-access-threadsafe.patch,
+ +files/l7-filter-userspace-0.11-pattern-loading-leak.patch,
+ l7-filter-userspace-0.11.ebuild:
+ Include fixes from debian and ppc/arm compatibility, bug #329397 (by Gavin
+ Pryke).
20 Jul 2011; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Drop maintainer due retirement, bug #34534
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch
new file mode 100644
index 000000000000..29801ceed31a
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch
@@ -0,0 +1,21 @@
+--- l7-filter-userspace-0.11/l7-filter.cpp.old 2010-07-12 10:43:58.485002456 +0100
++++ l7-filter-userspace-0.11/l7-filter.cpp 2010-07-12 11:14:38.825001868 +0100
+@@ -186,15 +186,11 @@
+ conffilename = "";
+ const char *opts = "f:q:vh?sb:dn:p:m:cz";
+
+- int done = 0;
+- while(!done)
++ int c;
++ while ((c = getopt (argc, argv, opts)) != -1)
+ {
+- char c;
+- switch(c = getopt(argc, argv, opts))
++ switch(c)
+ {
+- case -1:
+- done = 1;
+- break;
+ case 'f':
+ conffilename = optarg;
+ break;
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-map-access-threadsafe.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-map-access-threadsafe.patch
new file mode 100644
index 000000000000..fea0f5bbb5a6
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-map-access-threadsafe.patch
@@ -0,0 +1,55 @@
+--- l7-filter-userspace-0.11/l7-conntrack.cpp.orig 2009-02-26 21:40:28.000000000 +0000
++++ l7-filter-userspace-0.11/l7-conntrack.cpp 2010-07-23 13:03:23.000000000 +0100
+@@ -195,11 +195,13 @@
+ {
+ nfct_conntrack_free(ct);
+ nfct_close(cth);
++ pthread_mutex_destroy(&map_mutex);
+ }
+
+ l7_conntrack::l7_conntrack(void* l7_classifier_in)
+ {
+ l7_classifier = (l7_classify *)l7_classifier_in;
++ pthread_mutex_init(&map_mutex, NULL);
+
+ // Now open a handler that is subscribed to all possible events
+ cth = nfct_open(CONNTRACK, NFCT_ALL_CT_GROUPS);
+@@ -211,19 +213,27 @@
+
+ l7_connection *l7_conntrack::get_l7_connection(const string key)
+ {
+- return l7_connections[key];
++ l7_connection *conn;
++ pthread_mutex_lock(&map_mutex);
++ conn = l7_connections[key];
++ pthread_mutex_unlock(&map_mutex);
++ return conn;
+ }
+
+ void l7_conntrack::add_l7_connection(l7_connection* connection,
+ const string key)
+ {
++ pthread_mutex_lock(&map_mutex);
+ l7_connections[key] = connection;
++ pthread_mutex_unlock(&map_mutex);
+ }
+
+ void l7_conntrack::remove_l7_connection(const string key)
+ {
++ pthread_mutex_lock(&map_mutex);
+ delete l7_connections[key];
+ l7_connections.erase(l7_connections.find(key));
++ pthread_mutex_unlock(&map_mutex);
+ }
+
+ void l7_conntrack::start()
+--- l7-filter-userspace-0.11/l7-conntrack.h.orig 2010-07-23 13:04:49.000000000 +0100
++++ l7-filter-userspace-0.11/l7-conntrack.h 2010-07-23 13:05:56.000000000 +0100
+@@ -52,6 +52,7 @@
+ l7_map l7_connections;
+ struct nfct_conntrack *ct;
+ struct nfct_handle *cth; // the callback
++ pthread_mutex_t map_mutex;
+
+ public:
+ l7_conntrack(void * foo);
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-pattern-loading-leak.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-pattern-loading-leak.patch
new file mode 100644
index 000000000000..835fc8ffb9f1
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-pattern-loading-leak.patch
@@ -0,0 +1,10 @@
+diff --git a/l7-filter-userspace/trunk/l7-classify.cpp b/l7-filter-userspace/trunk/l7-classify.cpp
+index 8b5b77e..1c80d4d 100644
+--- a/l7-filter-userspace/trunk/l7-classify.cpp
++++ b/l7-filter-userspace/trunk/l7-classify.cpp
+@@ -59,6 +59,7 @@ l7_pattern::l7_pattern(string name, string pattern_string, int eflags,
+ cerr << "error compiling " << name << " -- " << pattern_string << endl;
+ exit(1);
+ }
++ free(preprocessed);
+ }
diff --git a/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild b/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
index 1d94f6e2f6aa..1c6928addf53 100644
--- a/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
+++ b/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
@@ -1,30 +1,33 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild,v 1.2 2010/07/18 02:47:57 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild,v 1.3 2012/03/03 15:31:46 pacho Exp $
-EAPI="2"
+EAPI=4
-inherit eutils
+inherit eutils autotools
DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
-HOMEPAGE="http://l7-filter.sourceforge.net"
+HOMEPAGE="http://l7-filter.clearfoundation.com/"
SRC_URI="mirror://sourceforge/l7-filter/${P}.tar.gz"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"
IUSE=""
SLOT="0"
-DEPEND="
- >=net-libs/libnetfilter_conntrack-0.0.100
+DEPEND=">=net-libs/libnetfilter_conntrack-0.0.100
net-libs/libnetfilter_queue"
RDEPEND="net-misc/l7-protocols
${DEPEND}"
src_prepare() {
- epatch "${FILESDIR}"/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch
+ epatch "${FILESDIR}/${P}-map-access-threadsafe.patch"
+ epatch "${FILESDIR}/${P}-arm-ppc-getopt-help-fix.patch"
+ epatch "${FILESDIR}/${P}-libnetfilter_conntrack-0.0.100.patch"
+ epatch "${FILESDIR}/${P}-pattern-loading-leak.patch"
+ eautoreconf
}
src_install() {
- emake DESTDIR="${D}" install || die
+ emake DESTDIR="${D}" install
dodoc README TODO BUGS THANKS AUTHORS
}