summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2023-09-05 14:51:16 +0200
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2023-09-06 00:57:28 +0200
commit2ee8d0eef88acab60b42d0424c034414de47bddd (patch)
tree59ef81f7d93d8f9e797c2e2e8a90d1472872c900 /smoketest/scripts
parent435af27787160079cc4074c1257ba7191bc60380 (diff)
downloadvyos-1x-2ee8d0eef88acab60b42d0424c034414de47bddd.tar.gz
vyos-1x-2ee8d0eef88acab60b42d0424c034414de47bddd.zip
interface: T5550: Interface source-validation priority over global value
- Migrate IPv4 source-validation to nftables - Interface source-validation value takes priority, fallback to global value
Diffstat (limited to 'smoketest/scripts')
-rw-r--r--smoketest/scripts/cli/base_interfaces_test.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py
index 820024dc9..51ccbc9e6 100644
--- a/smoketest/scripts/cli/base_interfaces_test.py
+++ b/smoketest/scripts/cli/base_interfaces_test.py
@@ -834,8 +834,12 @@ class BasicInterfaceTest:
self.assertEqual('1', tmp)
if cli_defined(self._base_path + ['ip'], 'source-validation'):
- tmp = read_file(f'{proc_base}/rp_filter')
- self.assertEqual('2', tmp)
+ base_options = f'iifname "{interface}"'
+ out = cmd('sudo nft list chain ip raw vyos_rpfilter')
+ for line in out.splitlines():
+ if line.startswith(base_options):
+ self.assertIn('fib saddr oif 0', line)
+ self.assertIn('drop', line)
def test_interface_ipv6_options(self):
if not self._test_ipv6: