]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
iptables: fix save/restore symlinks with libnftnl PACKAGECONFIG enabled
authorKirill Yatsenko <kiriyatsenko@gmail.com>
Tue, 4 Jun 2024 12:06:49 +0000 (14:06 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Jun 2024 13:27:21 +0000 (14:27 +0100)
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.

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>
meta/recipes-extended/iptables/iptables_1.8.10.bb

index a9c88582cdac59352e28af0f69c6707a857496e0..86f1335ac8bab72898c85bf9bd585dc2d57f16f2 100644 (file)
@@ -73,6 +73,8 @@ do_install:append() {
     # if libnftnl is included, make the iptables symlink point to the nft-based binary by default
     if ${@bb.utils.contains('PACKAGECONFIG', 'libnftnl', 'true', 'false', d)} ; then
         ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables 
+        ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables-save
+        ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables-restore
     fi
 }