diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-09-29 13:59:10 +0200 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-08-25 15:53:30 +0200 |
commit | d62f8ed1e3608d82e3e4fb7566817839023aa39c (patch) | |
tree | 4613bd1c9b5fc983c7cc1031d3e64677d528329c /smoketest/scripts/cli | |
parent | 5ea0428a08ae9e85fe2ebb6bb85dca07c5eb694f (diff) | |
download | vyos-1x-d62f8ed1e3608d82e3e4fb7566817839023aa39c.tar.gz vyos-1x-d62f8ed1e3608d82e3e4fb7566817839023aa39c.zip |
firewall: T3509: Add support for IPv6 return path filtering
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-x | smoketest/scripts/cli/test_firewall.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_firewall.py b/smoketest/scripts/cli/test_firewall.py index b2076c077..c6514210b 100755 --- a/smoketest/scripts/cli/test_firewall.py +++ b/smoketest/scripts/cli/test_firewall.py @@ -511,6 +511,27 @@ class TestFirewall(VyOSUnitTestSHIM.TestCase): self.verify_nftables(nftables_search, 'ip vyos_filter') + def test_source_validation(self): + # Strict + self.cli_set(['firewall', 'global-options', 'source-validation', 'strict']) + self.cli_commit() + + nftables_strict_search = [ + ['fib saddr . iif oif 0', 'drop'] + ] + + self.verify_nftables(nftables_strict_search, 'inet vyos_global_rpfilter') + + # Loose + self.cli_set(['firewall', 'global-options', 'source-validation', 'loose']) + self.cli_commit() + + nftables_loose_search = [ + ['fib saddr oif 0', 'drop'] + ] + + self.verify_nftables(nftables_loose_search, 'inet vyos_global_rpfilter') + def test_sysfs(self): for name, conf in sysfs_config.items(): paths = glob(conf['sysfs']) |