summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-10-24 15:26:18 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-10-24 15:26:33 +0200
commit281ad1c5b4f2d41492b69aaf169f5fa6ea1ab20b (patch)
treeea88901b63f5f69facbd0cefb48cd948d2905e48
parentapp-emulation/cloud-init: version bump 17.2 → 18.4 (diff)
downloadgentoo-281ad1c5b4f2d41492b69aaf169f5fa6ea1ab20b.tar.gz
gentoo-281ad1c5b4f2d41492b69aaf169f5fa6ea1ab20b.tar.bz2
gentoo-281ad1c5b4f2d41492b69aaf169f5fa6ea1ab20b.zip
net-firewall/iptables: Fixed build with USE="-nftables"
Closes: https://bugs.gentoo.org/669486 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
-rw-r--r--net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch44
-rw-r--r--net-firewall/iptables/iptables-1.8.1.ebuild2
2 files changed, 46 insertions, 0 deletions
diff --git a/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch b/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch
new file mode 100644
index 000000000000..a0fca7efa93a
--- /dev/null
+++ b/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch
@@ -0,0 +1,44 @@
+From b2fc2a368562d55fadad94d995247bb8cd7e68a3 Mon Sep 17 00:00:00 2001
+From: Florian Westphal <fw@strlen.de>
+Date: Wed, 24 Oct 2018 12:00:11 +0200
+Subject: extensions: limit: unbreak build without libnftnl
+
+Lars Wendler reported 1.8.1 build failure when trying to build without nft backend:
+
+ In file included from ../iptables/nft.h:5, from libxt_limit.c:18: libnftnl/rule.h: No such file or directory
+
+Reported-by: Lars Wendler <polynomial-c@gentoo.org>
+Fixes: 02b80972c43 ("ebtables: Merge libebt_limit.c into libxt_limit.c")
+Signed-off-by: Florian Westphal <fw@strlen.de>
+---
+ extensions/libxt_limit.c | 1 -
+ iptables/nft-bridge.h | 1 +
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c
+index c7b66295..1b324657 100644
+--- a/extensions/libxt_limit.c
++++ b/extensions/libxt_limit.c
+@@ -15,7 +15,6 @@
+ #include <xtables.h>
+ #include <linux/netfilter/x_tables.h>
+ #include <linux/netfilter/xt_limit.h>
+-#include "iptables/nft.h"
+ #include "iptables/nft-bridge.h"
+
+ #define XT_LIMIT_AVG "3/hour"
+diff --git a/iptables/nft-bridge.h b/iptables/nft-bridge.h
+index 9d49ccbe..de52cd71 100644
+--- a/iptables/nft-bridge.h
++++ b/iptables/nft-bridge.h
+@@ -68,6 +68,7 @@ int ebt_get_mac_and_mask(const char *from, unsigned char *to, unsigned char *mas
+ #define EBT_VERDICT_BITS 0x0000000F
+
+ struct nftnl_rule;
++struct iptables_command_state;
+
+ static const char *ebt_standard_targets[NUM_STANDARD_TARGETS] = {
+ "ACCEPT",
+--
+cgit v1.2.1
+
diff --git a/net-firewall/iptables/iptables-1.8.1.ebuild b/net-firewall/iptables/iptables-1.8.1.ebuild
index 043562633bd1..3db0cde59048 100644
--- a/net-firewall/iptables/iptables-1.8.1.ebuild
+++ b/net-firewall/iptables/iptables-1.8.1.ebuild
@@ -42,6 +42,8 @@ RDEPEND="${COMMON_DEPEND}
"
src_prepare() {
+ eapply "${FILESDIR}/${P}-build_limit_without_libnftnl_fix.patch" #669486
+
# use the saner headers from the kernel
rm -f include/linux/{kernel,types}.h