From 0148bb131b2ac68f168562e9eaedce8aa4e4a875 Mon Sep 17 00:00:00 2001 From: "Maxin B. John" Date: Tue, 21 Feb 2017 13:55:07 +0200 Subject: iptables: upgrade to 1.6.1 1.6.0 -> 1.6.1 Refreshed the following patches: a) 0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b) 0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch Signed-off-by: Maxin B. John Signed-off-by: Ross Burton --- ...Add-option-to-enable-disable-libnfnetlink.patch | 28 ++++++++---- ...check-conntrack-when-libnfnetlink-enabled.patch | 53 ++++++++++++++-------- meta/recipes-extended/iptables/iptables_1.6.0.bb | 50 -------------------- meta/recipes-extended/iptables/iptables_1.6.1.bb | 50 ++++++++++++++++++++ 4 files changed, 104 insertions(+), 77 deletions(-) delete mode 100644 meta/recipes-extended/iptables/iptables_1.6.0.bb create mode 100644 meta/recipes-extended/iptables/iptables_1.6.1.bb diff --git a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch index b711b7aa36..03c36ccbc2 100644 --- a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch +++ b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch @@ -1,4 +1,7 @@ -[PATCH] configure: Add option to enable/disable libnfnetlink +From c46db7c2e1f63ec525835553587e70c635565310 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" +Date: Tue, 21 Feb 2017 11:16:31 +0200 +Subject: [PATCH] configure: Add option to enable/disable libnfnetlink This changes the configure behaviour from autodetecting for libnfnetlink to having an option to disable it explicitly @@ -8,20 +11,24 @@ Upstream-Status: Pending Signed-off-by: Khem Raj Signed-off-by: Maxin B. John --- -diff -Naur iptables-1.6.0-old/configure.ac iptables-1.6.0/configure.ac ---- iptables-1.6.0-old/configure.ac 2015-12-28 18:40:35.255417976 +0200 -+++ iptables-1.6.0/configure.ac 2015-12-29 13:01:12.388840200 +0200 -@@ -63,6 +63,9 @@ + configure.ac | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index eda7871..03ddc50 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -63,6 +63,9 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], AC_ARG_ENABLE([nftables], AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]), [enable_nftables="$enableval"], [enable_nftables="yes"]) +AC_ARG_ENABLE([libnfnetlink], + AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]), + [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"]) - - libiptc_LDFLAGS2=""; - AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed], -@@ -123,9 +126,10 @@ + AC_ARG_ENABLE([connlabel], + AS_HELP_STRING([--disable-connlabel], + [Do not build libnetfilter_conntrack]), +@@ -115,9 +118,10 @@ if test "x$enable_bpfc" = "xyes" || test "x$enable_nfsynproxy" = "xyes"; then AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler or nfsynproxy tool)) fi @@ -35,3 +42,6 @@ diff -Naur iptables-1.6.0-old/configure.ac iptables-1.6.0/configure.ac if test "x$enable_nftables" = "xyes"; then PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0]) +-- +2.4.0 + 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 index 89ad8f6668..7842c6408a 100644 --- 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 @@ -1,34 +1,51 @@ +From 26090b3dbcdf6a11e60535da949b726a6e86426d Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" +Date: Tue, 21 Feb 2017 11:49:07 +0200 +Subject: [PATCH] configure.ac: + only-check-conntrack-when-libnfnetlink-enabled.patch + Package libnetfilter-conntrack depends on package libnfnetlink. iptables checks package libnetfilter-conntrack whatever its package config libnfnetlink is enabled or not. When libnfnetlink is disabled but package libnetfilter-conntrack exists, it fails randomly with: -| In file included from .../iptables/1.4.21-r0/iptables-1.4.21/extensions/libxt_connlabel.c:8:0: -| .../tmp/sysroots/qemumips/usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h:14:42: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory -| compilation terminated. -| GNUmakefile:96: recipe for target 'libxt_connlabel.oo' failed +In file included from +.../iptables/1.4.21-r0/iptables-1.4.21/extensions/libxt_connlabel.c:8:0: + +.../tmp/sysroots/qemumips/usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h:14:42: +fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory +compilation terminated. +GNUmakefile:96: recipe for target 'libxt_connlabel.oo' failed Only check libnetfilter-conntrack when libnfnetlink is enabled to fix it. Upstream-Status: Pending Signed-off-by: Kai Kang +Signed-off-by: Maxin B. John +--- + configure.ac | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 5d7e62b..e331ee7 100644 +index 03ddc50..523caea 100644 --- a/configure.ac +++ b/configure.ac -@@ -88,8 +88,12 @@ if test "$ac_cv_header_linux_ip_vs_h" != "yes"; then - blacklist_modules="$blacklist_modules ipvs"; - fi; +@@ -172,10 +172,12 @@ if test "$nftables" != 1; then + fi --PKG_CHECK_MODULES([libnetfilter_conntrack], [libnetfilter_conntrack >= 1.0.4], -+nfconntrack=0 -+AS_IF([test "x$enable_libnfnetlink" = "xyes"], [ -+ PKG_CHECK_MODULES([libnetfilter_conntrack], [libnetfilter_conntrack >= 1.0.4], - [nfconntrack=1], [nfconntrack=0]) -+ ]) -+ - AM_CONDITIONAL([HAVE_LIBNETFILTER_CONNTRACK], [test "$nfconntrack" = 1]) - - if test "$nfconntrack" -ne 1; then + if test "x$enable_connlabel" = "xyes"; then +- PKG_CHECK_MODULES([libnetfilter_conntrack], ++ nfconntrack=0 ++ AS_IF([test "x$enable_libnfnetlink" = "xyes"], [ ++ PKG_CHECK_MODULES([libnetfilter_conntrack], + [libnetfilter_conntrack >= 1.0.6], + [nfconntrack=1], [nfconntrack=0]) +- ++ ]) + if test "$nfconntrack" -ne 1; then + blacklist_modules="$blacklist_modules connlabel"; + echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built"; +-- +2.4.0 + diff --git a/meta/recipes-extended/iptables/iptables_1.6.0.bb b/meta/recipes-extended/iptables/iptables_1.6.0.bb deleted file mode 100644 index fbbe4186b2..0000000000 --- a/meta/recipes-extended/iptables/iptables_1.6.0.bb +++ /dev/null @@ -1,50 +0,0 @@ -SUMMARY = "Tools for managing kernel packet filtering capabilities" -DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \ -filtering code in Linux." -HOMEPAGE = "http://www.netfilter.org/" -BUGTRACKER = "http://bugzilla.netfilter.org/" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\ - file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc" - -RRECOMMENDS_${PN} = "kernel-module-x-tables \ - kernel-module-ip-tables \ - kernel-module-iptable-filter \ - kernel-module-iptable-nat \ - kernel-module-nf-defrag-ipv4 \ - kernel-module-nf-conntrack \ - kernel-module-nf-conntrack-ipv4 \ - kernel-module-nf-nat \ - kernel-module-ipt-masquerade" -FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables" - -SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ - file://types.h-add-defines-that-are-required-for-if_packet.patch \ - file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ - file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \ - " -SRC_URI_append_libc-musl = " file://0001-fix-build-with-musl.patch" - -SRC_URI[md5sum] = "27ba3451cb622467fc9267a176f19a31" -SRC_URI[sha256sum] = "4bb72a0a0b18b5a9e79e87631ddc4084528e5df236bc7624472dcaa8480f1c60" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ - " -PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ - " - -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -# libnfnetlink recipe is in meta-networking layer -PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack" - -# libnftnl recipe is in meta-networking layer(previously known as libnftables) -PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl" - -do_configure_prepend() { - # Remove some libtool m4 files - # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. - rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 -} diff --git a/meta/recipes-extended/iptables/iptables_1.6.1.bb b/meta/recipes-extended/iptables/iptables_1.6.1.bb new file mode 100644 index 0000000000..9b4c05095a --- /dev/null +++ b/meta/recipes-extended/iptables/iptables_1.6.1.bb @@ -0,0 +1,50 @@ +SUMMARY = "Tools for managing kernel packet filtering capabilities" +DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \ +filtering code in Linux." +HOMEPAGE = "http://www.netfilter.org/" +BUGTRACKER = "http://bugzilla.netfilter.org/" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\ + file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc" + +RRECOMMENDS_${PN} = "kernel-module-x-tables \ + kernel-module-ip-tables \ + kernel-module-iptable-filter \ + kernel-module-iptable-nat \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-conntrack \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-nat \ + kernel-module-ipt-masquerade" +FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables" + +SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ + file://types.h-add-defines-that-are-required-for-if_packet.patch \ + file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ + file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \ + " +SRC_URI_append_libc-musl = " file://0001-fix-build-with-musl.patch" + +SRC_URI[md5sum] = "ab38a33806b6182c6f53d6afb4619add" +SRC_URI[sha256sum] = "0fc2d7bd5d7be11311726466789d4c65fb4c8e096c9182b56ce97440864f0cf5" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ + " +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ + " + +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +# libnfnetlink recipe is in meta-networking layer +PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack" + +# libnftnl recipe is in meta-networking layer(previously known as libnftables) +PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl" + +do_configure_prepend() { + # Remove some libtool m4 files + # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. + rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 +} -- cgit 1.2.3-korg