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>
# 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
}