Gentoo Archives: gentoo-commits

From: Sergey Popov <pinkbyte@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
Date: Tue, 28 Jan 2020 09:22:56
Message-Id: 1580203368.a0bd2ac5ca14b0b670df2b0934fea96b1b89a1fc.pinkbyte@gentoo
1 commit: a0bd2ac5ca14b0b670df2b0934fea96b1b89a1fc
2 Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 28 09:21:28 2020 +0000
4 Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 28 09:22:48 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0bd2ac5
7
8 net-firewall/ipt_netflow-2.4: build-time fixes
9
10 Fix building with kernel where CONFIG_BRIDGE_NETFILTER is not set
11
12 Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>
13 Package-Manager: Portage-2.3.84, Repoman-2.3.11
14
15 .../files/ipt_netflow-2.4-bridge_netfilter.patch | 61 ++++++++++++++++++++++
16 net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild | 3 +-
17 2 files changed, 63 insertions(+), 1 deletion(-)
18
19 diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.4-bridge_netfilter.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.4-bridge_netfilter.patch
20 new file mode 100644
21 index 00000000000..cde23bc9fe7
22 --- /dev/null
23 +++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.4-bridge_netfilter.patch
24 @@ -0,0 +1,61 @@
25 +From 9288e30f493d252ee85b492a894f78073e4f6d41 Mon Sep 17 00:00:00 2001
26 +From: ABC <abc@××××××××.com>
27 +Date: Sat, 28 Sep 2019 23:29:40 +0300
28 +Subject: [PATCH] Don't compile physdev-override if BRIDGE_NETFILTER is
29 + disabled.
30 +
31 +Fixes #120 "Compile error nf_bridge / nf_trace" reported by DocMAX.
32 +
33 +Fixes: 51bdc2b ("Use nf_bridge_info_get() instead of skb->nf_bridge").
34 +---
35 + compat.h | 2 ++
36 + configure | 1 +
37 + ipt_NETFLOW.c | 5 +++++
38 + 3 files changed, 8 insertions(+)
39 +
40 +diff --git a/compat.h b/compat.h
41 +index 0f9896b..66e224b 100644
42 +--- a/compat.h
43 ++++ b/compat.h
44 +@@ -680,11 +680,13 @@ static inline int is_vlan_dev(struct net_device *dev)
45 + #endif
46 +
47 + #if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
48 ++# ifdef CONFIG_BRIDGE_NETFILTER
49 + static inline struct nf_bridge_info *
50 + nf_bridge_info_get(const struct sk_buff *skb)
51 + {
52 + return skb->nf_bridge;
53 + }
54 ++# endif
55 + #endif
56 +
57 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
58 +diff --git a/configure b/configure
59 +index 74eece5..8aae8bf 100755
60 +--- a/configure
61 ++++ b/configure
62 +@@ -470,6 +470,7 @@ kernel_check_config() {
63 + kconfig CONFIG_NF_CONNTRACK_EVENTS "natevents"
64 + kconfig CONFIG_IPV6 "IPv6"
65 + kconfig CONFIG_IP6_NF_IPTABLES "ip6tables target"
66 ++ kconfig CONFIG_BRIDGE_NETFILTER "physdev override"
67 + }
68 +
69 + kernel_check_include() {
70 +diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
71 +index fe25655..064de6c 100644
72 +--- a/ipt_NETFLOW.c
73 ++++ b/ipt_NETFLOW.c
74 +@@ -83,6 +83,11 @@
75 + #if defined(CONFIG_NF_NAT_NEEDED) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
76 + # include <net/netfilter/nf_conntrack_timestamp.h>
77 + #endif
78 ++#ifdef ENABLE_PHYSDEV_OVER
79 ++# ifndef CONFIG_BRIDGE_NETFILTER
80 ++# undef ENABLE_PHYSDEV_OVER
81 ++# endif
82 ++#endif
83 +
84 + #define IPT_NETFLOW_VERSION "2.4" /* Note that if you are using git, you
85 + will see version in other format. */
86
87 diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
88 index 8db277d79e5..c3bec366b46 100644
89 --- a/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
90 +++ b/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
91 @@ -1,4 +1,4 @@
92 -# Copyright 1999-2019 Gentoo Authors
93 +# Copyright 1999-2020 Gentoo Authors
94 # Distributed under the terms of the GNU General Public License v2
95
96 EAPI=7
97 @@ -28,6 +28,7 @@ DEPEND="${RDEPEND}
98 PATCHES=(
99 "${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
100 "${FILESDIR}/${PN}-2.3-flags.patch"
101 + "${FILESDIR}/${P}-bridge_netfilter.patch"
102 )
103
104 pkg_setup() {