summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Yatsenko <kiriyatsenko@gmail.com>2024-06-04 14:06:49 +0200
committerSteve Sakoman <steve@sakoman.com>2024-08-01 06:08:09 -0700
commitc861a9f92f0f4e2329433e21825d7c738901a8e4 (patch)
tree7b88620c0b17b78d8ec2542c6a044cf96031ba7b
parent0744992e24f6410d7ec958d3e1a6e8dda514a546 (diff)
downloadpoky-c861a9f92f0f4e2329433e21825d7c738901a8e4.tar.gz
iptables: fix save/restore symlinks with libnftnl PACKAGECONFIG enabled
When the libnftnl PACKAGECONFIG is enabled, the "iptables" symlink is correctly points to xtables-nft-multi, however the "iptables-save" and "iptables-restore" are still point to the xtables-legacy-multi. So, when the "iptables" command is used it's using the nftables backend where is the "iptables-save/restore" are using the legacy backend. This is not consistent with other distros (e.g. Ubuntu). The issue was identified when testing the UFW firewall with nftables backend. (From OE-Core rev: 2c0d03ed7bb9c17b1c3ccefd00bf3a4ede9e291f) Signed-off-by: Kirill Yatsenko <kiriyatsenko@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6579e4333b74232d8b576c399eab88e37da881ac) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-extended/iptables/iptables_1.8.10.bb2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-extended/iptables/iptables_1.8.10.bb b/meta/recipes-extended/iptables/iptables_1.8.10.bb
index cd2f3bce0b..0070264844 100644
--- a/meta/recipes-extended/iptables/iptables_1.8.10.bb
+++ b/meta/recipes-extended/iptables/iptables_1.8.10.bb
@@ -75,6 +75,8 @@ do_install:append() {
75 # if libnftnl is included, make the iptables symlink point to the nft-based binary by default 75 # if libnftnl is included, make the iptables symlink point to the nft-based binary by default
76 if ${@bb.utils.contains('PACKAGECONFIG', 'libnftnl', 'true', 'false', d)} ; then 76 if ${@bb.utils.contains('PACKAGECONFIG', 'libnftnl', 'true', 'false', d)} ; then
77 ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables 77 ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables
78 ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables-save
79 ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables-restore
78 fi 80 fi
79} 81}
80 82