summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch34
-rw-r--r--meta/recipes-extended/iptables/iptables_1.4.21.bb3
2 files changed, 36 insertions, 1 deletions
diff --git a/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch b/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch
new file mode 100644
index 0000000000..89ad8f6668
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch
@@ -0,0 +1,34 @@
1Package libnetfilter-conntrack depends on package libnfnetlink. iptables
2checks package libnetfilter-conntrack whatever its package config
3libnfnetlink is enabled or not. When libnfnetlink is disabled but
4package libnetfilter-conntrack exists, it fails randomly with:
5
6| In file included from .../iptables/1.4.21-r0/iptables-1.4.21/extensions/libxt_connlabel.c:8:0:
7| .../tmp/sysroots/qemumips/usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h:14:42: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
8| compilation terminated.
9| GNUmakefile:96: recipe for target 'libxt_connlabel.oo' failed
10
11Only check libnetfilter-conntrack when libnfnetlink is enabled to fix it.
12
13Upstream-Status: Pending
14
15Signed-off-by: Kai Kang <kai.kang@windriver.com>
16
17diff --git a/configure.ac b/configure.ac
18index 5d7e62b..e331ee7 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -88,8 +88,12 @@ if test "$ac_cv_header_linux_ip_vs_h" != "yes"; then
22 blacklist_modules="$blacklist_modules ipvs";
23 fi;
24
25-PKG_CHECK_MODULES([libnetfilter_conntrack], [libnetfilter_conntrack >= 1.0.4],
26+nfconntrack=0
27+AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
28+ PKG_CHECK_MODULES([libnetfilter_conntrack], [libnetfilter_conntrack >= 1.0.4],
29 [nfconntrack=1], [nfconntrack=0])
30+ ])
31+
32 AM_CONDITIONAL([HAVE_LIBNETFILTER_CONNTRACK], [test "$nfconntrack" = 1])
33
34 if test "$nfconntrack" -ne 1; then
diff --git a/meta/recipes-extended/iptables/iptables_1.4.21.bb b/meta/recipes-extended/iptables/iptables_1.4.21.bb
index 31c017b2ce..deea5e5144 100644
--- a/meta/recipes-extended/iptables/iptables_1.4.21.bb
+++ b/meta/recipes-extended/iptables/iptables_1.4.21.bb
@@ -23,6 +23,7 @@ SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
23 file://types.h-add-defines-that-are-required-for-if_packet.patch \ 23 file://types.h-add-defines-that-are-required-for-if_packet.patch \
24 file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ 24 file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
25 file://0001-fix-build-with-musl.patch \ 25 file://0001-fix-build-with-musl.patch \
26 file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
26 " 27 "
27 28
28SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0" 29SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0"
@@ -38,7 +39,7 @@ PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)
38PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," 39PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
39 40
40# libnfnetlink recipe is in meta-networking layer 41# libnfnetlink recipe is in meta-networking layer
41PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink" 42PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
42 43
43do_configure_prepend() { 44do_configure_prepend() {
44 # Remove some libtool m4 files 45 # Remove some libtool m4 files