summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/l7-filter-userspace
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/l7-filter-userspace')
-rw-r--r--net-misc/l7-filter-userspace/Manifest2
-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-datatype.patch11
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch104
-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.ebuild33
-rw-r--r--net-misc/l7-filter-userspace/l7-filter-userspace-0.12_beta1.ebuild33
-rw-r--r--net-misc/l7-filter-userspace/metadata.xml9
9 files changed, 278 insertions, 0 deletions
diff --git a/net-misc/l7-filter-userspace/Manifest b/net-misc/l7-filter-userspace/Manifest
new file mode 100644
index 000000000000..3b1f7469e06c
--- /dev/null
+++ b/net-misc/l7-filter-userspace/Manifest
@@ -0,0 +1,2 @@
+DIST l7-filter-userspace-0.11.tar.gz 129986 SHA256 008a62430f95a162fd209d4bf3d7359c588ca4b27f89c7bcaa7a10ff48591d97
+DIST l7-filter-userspace-0.12-beta1.tar.gz 130254 SHA256 1f4503c219334fba9c696c2243a3e926e5b299916baf1512ff6969da2d399d29 SHA512 9c49b7e951ced6a44f8ee6f3a261ba14b1e3fe44a83e175f7f5a5821616ec8bc2b0a287f10b4485120e7783c9623c34aae2ee1d8997c258cdfb8230c1f87d137 WHIRLPOOL 719bd6fb3513a676fdd4de828095e847565040993676cadcc4e5dda46459edb578355a13086d5f8bb5575fe32e2df1e835029cfd0bb0e50884e75f37c409ccfc
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-datatype.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-datatype.patch
new file mode 100644
index 000000000000..eb49c595844b
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-datatype.patch
@@ -0,0 +1,11 @@
+--- l7-filter-userspace-0.11/l7-queue.cpp.orig 2008-09-27 10:51:01.000000000 +0400
++++ l7-filter-userspace-0.11/l7-queue.cpp 2011-11-05 03:11:08.595773935 +0400
+@@ -196,7 +196,7 @@
+ ifi = nfq_get_outdev(tb);
+ if(ifi) l7printf(4, "outdev = %d ", ifi);
+
+- ret = nfq_get_payload(tb, &data);
++ ret = nfq_get_payload(tb, (unsigned char**)&data);
+ if(ret >= 0) l7printf(4, "payload_len = %d\n", ret);
+
+ char ip_protocol = data[9];
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch
new file mode 100644
index 000000000000..6cc941ddd1a6
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch
@@ -0,0 +1,104 @@
+diff -Naur l7-filter-userspace-0.11-orig/l7-conntrack.cpp l7-filter-userspace-0.11-ptch/l7-conntrack.cpp
+--- l7-filter-userspace-0.11-orig/l7-conntrack.cpp 2009-02-26 21:40:28.000000000 +0000
++++ l7-filter-userspace-0.11-ptch/l7-conntrack.cpp 2009-10-19 17:40:42.000000000 +0000
+@@ -121,25 +121,10 @@
+ return (char *)buffer;
+ }
+
+-static int sprintf_conntrack_key(char *buf, struct nfct_conntrack *ct,
+- unsigned int flags)
+-{
+- int size = 0;
+-
+- size += nfct_sprintf_protocol(buf, ct);
+- size += nfct_sprintf_address(buf+size, &ct->tuple[NFCT_DIR_ORIGINAL]);
+- size += nfct_sprintf_proto(buf+size, &ct->tuple[NFCT_DIR_ORIGINAL]);
+-
+- /* Delete the last blank space */
+- buf[size-1] = '\0';
+-
+- return size;
+-}
+-
+-static string make_key(nfct_conntrack* ct, int flags)
++static string make_key(nfct_conntrack* ct, int flags, int type)
+ {
+ char key[512];
+- int keysize = sprintf_conntrack_key(key, ct, flags);
++ int keysize = nfct_snprintf(key, sizeof(key), (const nf_conntrack *)ct, type, NFCT_O_DEFAULT, flags);
+ if(keysize >= 512){
+ cerr << "Yike! Overflowed key!\n";
+ exit(1);
+@@ -148,28 +133,28 @@
+ return key;
+ }
+
+-static int l7_handle_conntrack_event(void *arg, unsigned int flags, int type,
++static int l7_handle_conntrack_event(enum nf_conntrack_msg_type type, struct nf_conntrack* arg,
+ void *data)
+ {
+ l7_conntrack * l7_conntrack_handler = (l7_conntrack *) data;
+
+ nfct_conntrack* ct = (nfct_conntrack*)arg;
++ u_int8_t protonum = *(u_int8_t *)nfct_get_attr((const nf_conntrack *)ct, ATTR_ORIG_L4PROTO);
+
+ // I don't think there is any demand for ICMP. These are enough work for now.
+- if(ct->tuple[0].protonum != IPPROTO_TCP &&
+- ct->tuple[0].protonum != IPPROTO_UDP) return 0;
++ if(protonum != IPPROTO_TCP && protonum != IPPROTO_UDP) return 0;
+
+- if(type == NFCT_MSG_DESTROY) l7printf(3, "Got event: NFCT_MSG_DESTROY\n");
+- if(type == NFCT_MSG_NEW) l7printf(3, "Got event: NFCT_MSG_NEW\n");
+- if(type == NFCT_MSG_UPDATE) l7printf(3, "Got event: NFCT_MSG_UPDATE\n");
+- if(type == NFCT_MSG_UNKNOWN) l7printf(3, "Got event: NFCT_MSG_UNKNOWN\n");
++ if(type == NFCT_T_DESTROY) l7printf(3, "Got event: NFCT_T_DESTROY\n");
++ if(type == NFCT_T_NEW) l7printf(3, "Got event: NFCT_T_NEW\n");
++ if(type == NFCT_T_UPDATE) l7printf(3, "Got event: NFCT_T_UPDATE\n");
++ if(type == NFCT_T_UNKNOWN) l7printf(3, "Got event: NFCT_T_UNKNOWN\n");
+
+ // On the first packet, create the connection buffer, etc.
+- if(type == NFCT_MSG_NEW){
+- string key = make_key(ct, flags);
++ if(type == NFCT_T_NEW){
++ string key = make_key(ct, 0, NFCT_T_NEW);
+ if (l7_conntrack_handler->get_l7_connection(key)){
+ // this happens sometimes
+- cerr << "Received NFCT_MSG_NEW but already have a connection. Packets = "
++ cerr << "Received NFCT_T_NEW but already have a connection. Packets = "
+ << l7_conntrack_handler->get_l7_connection(key)->get_num_packets()
+ << endl;
+ l7_conntrack_handler->remove_l7_connection(key);
+@@ -179,9 +164,9 @@
+ l7_conntrack_handler->add_l7_connection(thisconnection, key);
+ thisconnection->key = key;
+ }
+- else if(type == NFCT_MSG_DESTROY){
++ else if(type == NFCT_T_DESTROY){
+ // clean up the connection buffer, etc.
+- string key = make_key(ct, flags);
++ string key = make_key(ct, 0, NFCT_T_DESTROY);
+ if(l7_conntrack_handler->get_l7_connection(key)){
+ l7_conntrack_handler->remove_l7_connection(key);
+ }
+@@ -193,7 +178,7 @@
+
+ l7_conntrack::~l7_conntrack()
+ {
+- nfct_conntrack_free(ct);
++ free(ct);
+ nfct_close(cth);
+ }
+
+@@ -230,9 +215,9 @@
+ {
+ int ret;
+
+- nfct_register_callback(cth, l7_handle_conntrack_event, (void *)this);
+- ret = nfct_event_conntrack(cth); // this is the main loop
++ nfct_callback_register(cth, NFCT_T_NEW, l7_handle_conntrack_event, (void *)this);
++ ret = nfct_catch(cth); // this is the main loop
+
+ nfct_close(cth);
+- nfct_conntrack_free(ct);
++ free(ct);
+ }
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
new file mode 100644
index 000000000000..891c61daca15
--- /dev/null
+++ b/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
+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
+ net-libs/libnetfilter_queue"
+RDEPEND="net-misc/l7-protocols
+ ${DEPEND}"
+
+src_prepare() {
+ 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
+ dodoc README TODO BUGS THANKS AUTHORS
+}
diff --git a/net-misc/l7-filter-userspace/l7-filter-userspace-0.12_beta1.ebuild b/net-misc/l7-filter-userspace/l7-filter-userspace-0.12_beta1.ebuild
new file mode 100644
index 000000000000..aca733580a09
--- /dev/null
+++ b/net-misc/l7-filter-userspace/l7-filter-userspace-0.12_beta1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils versionator
+
+MY_P=${PN}-$(replace_version_separator 2 '-')
+
+DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
+HOMEPAGE="http://l7-filter.clearfoundation.com/"
+SRC_URI="http://download.clearfoundation.com/l7-filter/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+SLOT="0"
+
+DEPEND=">=net-libs/libnetfilter_conntrack-0.0.100
+ >=net-libs/libnetfilter_queue-1.0.0
+ net-libs/libnfnetlink"
+RDEPEND="${DEPEND}
+ net-misc/l7-protocols"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( README TODO BUGS THANKS AUTHORS )
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.11-libnetfilter_conntrack-0.0.100.patch" \
+ "${FILESDIR}/${PN}-0.11-datatype.patch"
+}
diff --git a/net-misc/l7-filter-userspace/metadata.xml b/net-misc/l7-filter-userspace/metadata.xml
new file mode 100644
index 000000000000..554c6cf7fcdb
--- /dev/null
+++ b/net-misc/l7-filter-userspace/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+</pkgmetadata>
+