commit:     47dba6226b616c192fd3fb9d0f37ec2945498f60
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 16 22:36:56 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 16 22:37:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47dba622

net-firewall/ipt_netflow: fix build with linux-headers-5.14

Closes: https://bugs.gentoo.org/813993
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../ipt_netflow-2.6-fix-linux-headers-5.14.patch   | 29 ++++++++++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild    |  2 ++
 2 files changed, 31 insertions(+)

diff --git 
a/net-firewall/ipt_netflow/files/ipt_netflow-2.6-fix-linux-headers-5.14.patch 
b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-fix-linux-headers-5.14.patch
new file mode 100644
index 000000000000..0f52b68d5235
--- /dev/null
+++ 
b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-fix-linux-headers-5.14.patch
@@ -0,0 +1,29 @@
+https://github.com/aabc/ipt-netflow/commit/66e4304101010108892376866334ec9317b427d8.patch
+https://bugs.gentoo.org/813993
+
+From: ABC <a...@openwall.com>
+Date: Wed, 14 Jul 2021 15:39:42 +0300
+Subject: [PATCH] Namespace sk_error_report
+
+sk_error_report is introduced in v5.14-rc1: e3ae2365efc14 ("net: sock:
+introduce sk_error_report").
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -1943,7 +1943,7 @@ static struct ctl_path netflow_sysctl_path[] = {
+ #endif /* CONFIG_SYSCTL */
+ 
+ /* socket code */
+-static void sk_error_report(struct sock *sk)
++static void netflow_sk_error_report(struct sock *sk)
+ {
+       struct ipt_netflow_sock *usock;
+ 
+@@ -1974,7 +1974,7 @@ static struct socket *usock_open_sock(struct 
ipt_netflow_sock *usock)
+       }
+       sock->sk->sk_allocation = GFP_ATOMIC;
+       sock->sk->sk_prot->unhash(sock->sk); /* hidden from input */
+-      sock->sk->sk_error_report = &sk_error_report; /* clear ECONNREFUSED */
++      sock->sk->sk_error_report = &netflow_sk_error_report; /* clear 
ECONNREFUSED */
+       sock->sk->sk_user_data = usock;
+       sock->sk->sk_reuse = SK_CAN_REUSE;
+ 

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild 
b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
index 35009fb8ac17..4665d475be3d 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
@@ -32,6 +32,8 @@ PATCHES=(
        "${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
        "${FILESDIR}/${PN}-2.6-gentoo.patch"
        "${FILESDIR}/${P}-ref_module_fix.patch" # bug #781014
+       "${FILESDIR}/${P}-fix-linux-headers-5.14.patch" # bug #813993
+
 )
 
 pkg_setup() {

Reply via email to