summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-01-03 21:24:57 +0100
committerGitHub <noreply@github.com>2026-01-03 21:24:57 +0100
commit1fc20e61560d26abec5277a62a318070c8596437 (patch)
tree17569ea063f65d9f76b4fc4dfd86402b83f6f993 /smoketest/scripts/cli
parent50fb2078f3166aa0006777c15222a09f8c5251dc (diff)
parent5cf24b4fe790597a78d6061fe4822addbcf5f6bd (diff)
downloadvyos-1x-1fc20e61560d26abec5277a62a318070c8596437.tar.gz
vyos-1x-1fc20e61560d26abec5277a62a318070c8596437.zip
Merge pull request #4927 from bilde2910/T8138
T8138: add nat66 as dependent of firewall groups
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_nat66.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_nat66.py b/smoketest/scripts/cli/test_nat66.py
index 5e5e4829a..403c428cf 100755
--- a/smoketest/scripts/cli/test_nat66.py
+++ b/smoketest/scripts/cli/test_nat66.py
@@ -39,6 +39,32 @@ class TestNAT66(VyOSUnitTestSHIM.TestCase):
# always forward to base class
super().tearDown()
+ def test_firewall_group_dependence(self):
+ address_group = 'smoketest_addr_dependence'
+ address_group_member_1 = 'fc00::1'
+ address_group_member_2 = 'fc00::2'
+ translation_prefix = 'fc01::/64'
+
+ # add an address group and set a nat66 rule with it
+ self.cli_set(['firewall', 'group', 'ipv6-address-group', address_group, 'address', address_group_member_1])
+ self.cli_set(dst_path + ['rule', '1', 'destination', 'group', 'address-group', address_group])
+ self.cli_set(src_path + ['rule', '1', 'translation', 'address', translation_prefix])
+ # commit changes to build configuration file
+ self.cli_commit()
+
+ # replace the member of the address group
+ self.cli_delete(['firewall', 'group', 'ipv6-address-group', address_group, 'address', address_group_member_1])
+ self.cli_set(['firewall', 'group', 'ipv6-address-group', address_group, 'address', address_group_member_2])
+ self.cli_commit()
+
+ # verify that the new member is in the address group
+ nftables_search = [
+ [f'set A6_{address_group}'],
+ [f'elements = {{ {address_group_member_2} }}']
+ ]
+
+ self.verify_nftables(nftables_search, 'ip6 vyos_nat')
+
def test_source_nat66(self):
source_prefix = 'fc00::/64'
translation_prefix = 'fc01::/64'