summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorTrevor Gamblin <trevor.gamblin@windriver.com>2022-03-17 15:22:27 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-18 23:32:46 +0000
commit6869c34df89241c3f2d53f40188b93aa156643b7 (patch)
treeb6fd8efa9455273c951db97a2c9dffa68c5d5b1d /meta/recipes-extended
parent547cf5b8208723f1c80f1d69dbb9919e41c1b282 (diff)
downloadpoky-6869c34df89241c3f2d53f40188b93aa156643b7.tar.gz
iptables: use nft backend with libnftnl PACKAGECONFIG
Currently, when the libnftnl (part of meta-networking) PACKAGECONFIG is enabled for iptables, both legacy and nft-based binaries are built and installed in the image. However, the "iptables" symlink in this case still points to xtables-legacy-multi, rather than xtables-nft-multi. This patch adds a conditional check to replace the symlink to point to the latter if iptables is built with libnftnl support, which is consistent with other major distros (e.g. Fedora). The "iptables-legacy" symlink remains present and unmodified. (From OE-Core rev: bc41682ab2a259b7bc6a56fa3ba42907f4c8bf25) Signed-off-by: tgamblin <trevor.gamblin@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/iptables/iptables_1.8.7.bb5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-extended/iptables/iptables_1.8.7.bb b/meta/recipes-extended/iptables/iptables_1.8.7.bb
index 839733aaa8..3b41882841 100644
--- a/meta/recipes-extended/iptables/iptables_1.8.7.bb
+++ b/meta/recipes-extended/iptables/iptables_1.8.7.bb
@@ -66,6 +66,11 @@ do_install:append() {
66 -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \ 66 -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \
67 ${D}${systemd_system_unitdir}/ip6tables.service 67 ${D}${systemd_system_unitdir}/ip6tables.service
68 fi 68 fi
69
70 # if libnftnl is included, make the iptables symlink point to the nft-based binary by default
71 if ${@bb.utils.contains('PACKAGECONFIG', 'libnftnl', 'true', 'false', d)} ; then
72 ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables
73 fi
69} 74}
70 75
71PACKAGES =+ "${PN}-modules ${PN}-apply" 76PACKAGES =+ "${PN}-modules ${PN}-apply"