summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2025-11-04 15:27:50 +0000
committerGitHub <noreply@github.com>2025-11-04 15:27:50 +0000
commit6d0324506a5b0419eb0ae001d8d006a414030405 (patch)
tree6f7fe23d6b9d4663479d57669d4f5aa0dc5bc887 /smoketest/scripts/cli
parent3c1dfa94dba6fff763a32666683c3bdd35af9bea (diff)
parentb85fb0e04685d21b6f0dc4c0c1c8ee22105a971e (diff)
downloadvyos-1x-6d0324506a5b0419eb0ae001d8d006a414030405.tar.gz
vyos-1x-6d0324506a5b0419eb0ae001d8d006a414030405.zip
Merge pull request #4825 from vyos/T7849
T7849: ZBF allow to use wildcard interfaces as member
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_firewall.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_firewall.py b/smoketest/scripts/cli/test_firewall.py
index 90a396df5..bc9900557 100755
--- a/smoketest/scripts/cli/test_firewall.py
+++ b/smoketest/scripts/cli/test_firewall.py
@@ -1086,6 +1086,34 @@ class TestFirewall(VyOSUnitTestSHIM.TestCase):
self.verify_nftables(nftables_search, 'ip vyos_filter')
self.verify_nftables(nftables_search_v6, 'ip6 vyos_filter')
+ def test_wildcard_interfaces(self):
+ wc_interfaces = [
+ 'eth0',
+ 'eth0.*',
+ 'eth1',
+ 'eth1.23.*',
+ 'eth2.5.25',
+ 'eth2.5.25.54',
+ 'eth3*',
+ 'eth4.*',
+ 'ipoe*',
+ 'peth3',
+ 'peth3.',
+ 'pod-one',
+ 'pppoe*',
+ 'pptp*',
+ 'l2tp*',
+ 'sstp*',
+ 'vpptun*',
+ ]
+ for iface in wc_interfaces:
+ self.cli_set(
+ ['firewall', 'zone', 'smoketest-wildcard', 'member', 'interface', iface]
+ )
+ self.cli_commit()
+
+ self.verify_nftables(wc_interfaces, 'ip vyos_filter')
+
def test_flow_offload(self):
self.cli_set(['interfaces', 'ethernet', 'eth0', 'vif', '10'])
self.cli_set(['firewall', 'flowtable', 'smoketest', 'interface', 'eth0.10'])