mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -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>
(cherry picked from commit 1b2f65bbe9)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
8e913e6c38
commit
7d8f9f6c0f
@@ -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