summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2019-10-02 17:33:23 +0300
committerSergey Popov <pinkbyte@gentoo.org>2019-10-02 17:33:47 +0300
commitcd00367401c11d4d9948453b952912cb6b7e2661 (patch)
treed5bd8faeef3bf1b7c43040530a084423eeda9ea9 /net-firewall
parentdev-python/pyro: Bump to 4.77 (diff)
downloadgentoo-cd00367401c11d4d9948453b952912cb6b7e2661.tar.gz
gentoo-cd00367401c11d4d9948453b952912cb6b7e2661.tar.bz2
gentoo-cd00367401c11d4d9948453b952912cb6b7e2661.zip
net-firewall/rtsp-conntrack: version bump
Add compatibility patch for kernel 5.3 Reported-by: Toralf Förster <toralf@gentoo.org> Closes: https://bugs.gentoo.org/695476 Signed-off-by: Sergey Popov <pinkbyte@gentoo.org> Package-Manager: Portage-2.3.66, Repoman-2.3.11
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/rtsp-conntrack/Manifest1
-rw-r--r--net-firewall/rtsp-conntrack/files/rtsp-conntrack-4.18-linux-5.3.patch122
-rw-r--r--net-firewall/rtsp-conntrack/rtsp-conntrack-4.18.ebuild28
3 files changed, 151 insertions, 0 deletions
diff --git a/net-firewall/rtsp-conntrack/Manifest b/net-firewall/rtsp-conntrack/Manifest
index bc425840e00c..4754b9c68cb4 100644
--- a/net-firewall/rtsp-conntrack/Manifest
+++ b/net-firewall/rtsp-conntrack/Manifest
@@ -1 +1,2 @@
+DIST rtsp-conntrack-4.18.tar.gz 12369 BLAKE2B ef5b3947ba563f3bc507e6ab1764a68ae14bdee228c37608fe4e0f0a0be5356b4cdcbcdeb7f47f7a0a36d64b77de8124f3ec4b0a14fa67747c88c3e4be9042f5 SHA512 c8f176153f2a1bc32702d309247641b80ff98d0b1b5cc4d2e05bf4e7a04be00ea4c2e0afef0fa398768f61a84c984528ddabae730931d3156f174b097c8566db
DIST rtsp-module-3.7.tar.gz 11474 BLAKE2B feb6f925c779ada01ef305ee91e4c805816bc3a62316ec4e89d8599f5e995f2d07a0de8ad76763eb9de9b4a24c065bd63b50e2f1eb2ef9959495baf2e3794920 SHA512 480316f41f7e9a2a75b73b3edcbbdc98bf293f013a5549c6829659e601d2d1ec0ac94f7a2519cd6e40d41cbd02cf64f81fe2a371c703c3b0ba36d200fe29a3c1
diff --git a/net-firewall/rtsp-conntrack/files/rtsp-conntrack-4.18-linux-5.3.patch b/net-firewall/rtsp-conntrack/files/rtsp-conntrack-4.18-linux-5.3.patch
new file mode 100644
index 000000000000..66a35019817d
--- /dev/null
+++ b/net-firewall/rtsp-conntrack/files/rtsp-conntrack-4.18-linux-5.3.patch
@@ -0,0 +1,122 @@
+From 57394bcd68459d3c31cc605e538824a41ba490d9 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Fri, 30 Aug 2019 09:10:23 -0500
+Subject: [PATCH] Fix build with Linux 5.3
+
+In Linux 5.3 nf_ct_expect_related() gained a flags argument.
+Calls to this function are sprinkled throughout a couple of
+source files, so rather than adding a #if to each call site, add
+a wrapper which will use the appropriate prototype.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+---
+ netfilter_helpers.h | 11 +++++++++++
+ nf_conntrack_rtsp.c | 5 ++---
+ nf_nat_rtsp.c | 11 +++++------
+ 3 files changed, 18 insertions(+), 9 deletions(-)
+
+diff --git a/netfilter_helpers.h b/netfilter_helpers.h
+index 903f374..d8b8ce3 100644
+--- a/netfilter_helpers.h
++++ b/netfilter_helpers.h
+@@ -14,6 +14,8 @@
+ /* Only include these functions for kernel code. */
+ #ifdef __KERNEL__
+
++#include <net/netfilter/nf_conntrack_expect.h>
++
+ #include <linux/ctype.h>
+ #define iseol(c) ( (c) == '\r' || (c) == '\n' )
+
+@@ -128,6 +130,15 @@ nf_nextline(char* p, uint len, uint* poff, uint* plineoff, uint* plinelen)
+ }
+ #endif /* NF_NEED_NEXTLINE */
+
++static inline int rtsp_nf_ct_expect_related(struct nf_conntrack_expect *expect)
++{
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
++ return nf_ct_expect_related(expect, 0);
++#else
++ return nf_ct_expect_related(expect);
++#endif
++}
++
+ #endif /* __KERNEL__ */
+
+ #endif /* _NETFILTER_HELPERS_H */
+diff --git a/nf_conntrack_rtsp.c b/nf_conntrack_rtsp.c
+index 8a2f182..300be0a 100644
+--- a/nf_conntrack_rtsp.c
++++ b/nf_conntrack_rtsp.c
+@@ -41,7 +41,6 @@
+ #include <net/tcp.h>
+
+ #include <net/netfilter/nf_conntrack.h>
+-#include <net/netfilter/nf_conntrack_expect.h>
+ #include <net/netfilter/nf_conntrack_helper.h>
+ #include "nf_conntrack_rtsp.h"
+
+@@ -396,8 +395,8 @@ help_out(struct sk_buff *skb, unsigned char *rb_ptr, unsigned int datalen,
+ &expinfo, rtp_exp, rtcp_exp);
+ #endif
+ else {
+- if (nf_ct_expect_related(rtp_exp) == 0) {
+- if (rtcp_exp && nf_ct_expect_related(rtcp_exp) != 0) {
++ if (rtsp_nf_ct_expect_related(rtp_exp) == 0) {
++ if (rtcp_exp && rtsp_nf_ct_expect_related(rtcp_exp) != 0) {
+ nf_ct_unexpect_related(rtp_exp);
+ pr_info("nf_conntrack_expect_related failed for rtcp\n");
+ ret = NF_DROP;
+diff --git a/nf_nat_rtsp.c b/nf_nat_rtsp.c
+index 59ea4fd..02b46c5 100644
+--- a/nf_nat_rtsp.c
++++ b/nf_nat_rtsp.c
+@@ -46,7 +46,6 @@
+ #endif
+ #include <net/netfilter/nf_nat_helper.h>
+ #include "nf_conntrack_rtsp.h"
+-#include <net/netfilter/nf_conntrack_expect.h>
+
+ #include <linux/inet.h>
+ #include <linux/ctype.h>
+@@ -202,7 +201,7 @@ rtsp_mangle_tran(enum ip_conntrack_info ctinfo,
+ case pb_single:
+ for (loport = prtspexp->loport; loport != 0; loport++) { /* XXX: improper wrap? */
+ rtp_t->dst.u.udp.port = htons(loport);
+- if (nf_ct_expect_related(rtp_exp) == 0) {
++ if (rtsp_nf_ct_expect_related(rtp_exp) == 0) {
+ pr_debug("using port %hu\n", loport);
+ break;
+ }
+@@ -215,12 +214,12 @@ rtsp_mangle_tran(enum ip_conntrack_info ctinfo,
+ case pb_range:
+ for (loport = prtspexp->loport; loport != 0; loport += 2) { /* XXX: improper wrap? */
+ rtp_t->dst.u.udp.port = htons(loport);
+- if (nf_ct_expect_related(rtp_exp) != 0) {
++ if (rtsp_nf_ct_expect_related(rtp_exp) != 0) {
+ continue;
+ }
+ hiport = loport + 1;
+ rtcp_exp->tuple.dst.u.udp.port = htons(hiport);
+- if (nf_ct_expect_related(rtcp_exp) != 0) {
++ if (rtsp_nf_ct_expect_related(rtcp_exp) != 0) {
+ nf_ct_unexpect_related(rtp_exp);
+ continue;
+ }
+@@ -243,14 +242,14 @@ rtsp_mangle_tran(enum ip_conntrack_info ctinfo,
+ case pb_discon:
+ for (loport = prtspexp->loport; loport != 0; loport++) { /* XXX: improper wrap? */
+ rtp_t->dst.u.udp.port = htons(loport);
+- if (nf_ct_expect_related(rtp_exp) == 0) {
++ if (rtsp_nf_ct_expect_related(rtp_exp) == 0) {
+ pr_debug("using port %hu (1 of 2)\n", loport);
+ break;
+ }
+ }
+ for (hiport = prtspexp->hiport; hiport != 0; hiport++) { /* XXX: improper wrap? */
+ rtp_t->dst.u.udp.port = htons(hiport);
+- if (nf_ct_expect_related(rtp_exp) == 0) {
++ if (rtsp_nf_ct_expect_related(rtp_exp) == 0) {
+ pr_debug("using port %hu (2 of 2)\n", hiport);
+ break;
+ }
diff --git a/net-firewall/rtsp-conntrack/rtsp-conntrack-4.18.ebuild b/net-firewall/rtsp-conntrack/rtsp-conntrack-4.18.ebuild
new file mode 100644
index 000000000000..e163cee5f15e
--- /dev/null
+++ b/net-firewall/rtsp-conntrack/rtsp-conntrack-4.18.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit linux-mod
+
+DESCRIPTION="RTSP conntrack module for Netfilter"
+HOMEPAGE="http://mike.it-loops.com/rtsp"
+SRC_URI="https://github.com/maru-sama/rtsp-linux/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}/rtsp-linux-${PV}"
+
+PATCHES=( "${FILESDIR}/${P}-linux-5.3.patch" )
+
+BUILD_TARGETS="all"
+MODULE_NAMES="
+ nf_conntrack_rtsp(net/netfilter::)
+ nf_nat_rtsp(net/ipv4/netfilter::)"
+MODULESD_NF_CONNTRACK_RTSP_DOCS="README.rst"
+
+CONFIG_CHECK="NF_CONNTRACK"
+WARNING_NF_CONNTRACK="You must enable NF_CONNTRACK in your kernel, otherwise ${PN} would not work"
+
+BUILD_PARAMS="KERNELDIR=${KERNEL_DIR} V=1"