summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2020-11-15 18:26:44 +0300
committerSergey Popov <pinkbyte@gentoo.org>2020-11-15 18:26:44 +0300
commit13a3eb076dd1b4ebd058333275c0363c7632f761 (patch)
tree6361a4e64eb262927ce9ec3843bbdfdabc4a3ad5 /net-firewall
parentnet-firewall/ipt_netflow: respect OBJDUMP and LD variables (diff)
downloadgentoo-13a3eb076dd1b4ebd058333275c0363c7632f761.tar.gz
gentoo-13a3eb076dd1b4ebd058333275c0363c7632f761.tar.bz2
gentoo-13a3eb076dd1b4ebd058333275c0363c7632f761.zip
net-firewall/ipt_netflow: backport some fixes for recent kernels
Reported-by: Agostino Sarubbo <ago@gentoo.org> Closes: https://bugs.gentoo.org/738062 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Sergey Popov <pinkbyte@gentoo.org>
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch32
-rw-r--r--net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild1
2 files changed, 33 insertions, 0 deletions
diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch
new file mode 100644
index 000000000000..49721e547fd7
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch
@@ -0,0 +1,32 @@
+commit 1153f73f038205dc17303e6e6c455bbbb56191f7
+Author: ABC <abc@openwall.com>
+Date: Wed Oct 14 15:35:57 2020 +0300
+
+ gen_compat_def: Check for vlan_dev_priv instead of version if
+
+diff --git a/gen_compat_def b/gen_compat_def
+index c0f20f6..3965e94 100755
+--- a/gen_compat_def
++++ b/gen_compat_def
+@@ -85,6 +85,8 @@ kbuild_test_struct proc_ops linux/proc_fs.h
+ kbuild_test_struct proc_ops linux/proc_fs.h
+ # No since v5.1, but present in CentOS-8's 4.18.0-227
+ kbuild_test_symbol synchronize_sched linux/rcupdate.h
++# Stumbled on 5.9
++kbuild_test_struct vlan_dev_priv linux/if_vlan.h
+
+ echo "// End of compat_def.h"
+
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index 01055df..6f95166 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -4874,7 +4874,7 @@ static void parse_l2_header(const struct sk_buff *skb, struct ipt_netflow_tuple
+ tuple->tag[tag_num++] = htons(vlan_tx_tag_get(skb));
+ else if (skb->dev && is_vlan_dev(skb->dev)) {
+ struct net_device *vlan_dev = skb->dev;
+-# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++# ifdef HAVE_VLAN_DEV_PRIV
+ struct vlan_dev_priv *vlan = vlan_dev_priv(vlan_dev);
+
+ /* `if` condition is `#if`ed intentionally, and this is
diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild
index 8fd0b2ad8ee8..8fa83402adaa 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild
@@ -28,6 +28,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
"${FILESDIR}/${PN}-2.5-gentoo.patch"
+ "${FILESDIR}/${P}-vlan_dev_priv.patch"
)
pkg_setup() {