mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
support/testing: TestIptables: check for netfilter legacy tables enabled
TestIptables expect netfilter legacy tables enabled in the kernel. Make sure we use iptables-legacy: iptables --version iptables v1.8.11 (legacy) The test would fail if nftables compat (iptables-nft) is enabled. iptables --version iptables v1.8.11 (nf_tables) Add the following configuration fragment to enable iptables-nft: BR2_PACKAGE_IPTABLES_NFTABLES=y BR2_PACKAGE_IPTABLES_NFTABLES_DEFAULT=y Acked-by: Fiona Klute <fiona.klute@gmx.de> Tested-by: Fiona Klute <fiona.klute@gmx.de> Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
This commit is contained in:
committed by
Fiona Klute
parent
c57bcf0d43
commit
1b2f65bbe9
@@ -38,7 +38,10 @@ class TestIptables(infra.basetest.BRTest):
|
||||
self.emulator.login()
|
||||
|
||||
# We check the program can execute.
|
||||
self.assertRunOk("iptables --version")
|
||||
cmd = "iptables --version"
|
||||
output, exit_code = self.emulator.run(cmd)
|
||||
self.assertEqual(exit_code, 0)
|
||||
self.assertTrue(output[0].endswith("(legacy)"))
|
||||
|
||||
# We delete all rules in all chains. We also set default
|
||||
# policies to ACCEPT for INPUT and OUTPUT chains. This should
|
||||
|
||||
Reference in New Issue
Block a user