summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2026-07-09 16:56:31 +0300
committerGitHub <noreply@github.com>2026-07-09 16:56:31 +0300
commit43dfe32914fc5dcb09d8fb6e59045e18f2d1d708 (patch)
tree067ed56dde7f23d3cd8a78d05ba5e808d95c1b96 /smoketest/scripts
parentc5e0d76021bf0cd08b2866928c4b171cbe5983e0 (diff)
parent5c5716a84abac766ad72334e3f159fffb9644c8f (diff)
downloadvyos-1x-43dfe32914fc5dcb09d8fb6e59045e18f2d1d708.tar.gz
vyos-1x-43dfe32914fc5dcb09d8fb6e59045e18f2d1d708.zip
Merge pull request #5314 from natali-rs1985/T9018
vpp: T9018: Auto-enable promiscuous mode for interfaces with VLANs
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_vpp.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py
index 35150a74a..f78052f68 100755
--- a/smoketest/scripts/cli/test_vpp.py
+++ b/smoketest/scripts/cli/test_vpp.py
@@ -1527,6 +1527,9 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
# Ensure that VPP process is active
self.assertTrue(process_named_running(PROCESS_NAME))
+ # Cleanup
+ self.cli_delete(['interfaces', 'ethernet', interface, 'vif', vlan])
+
def test_23_1_vpp_acl_subinterface(self):
base_acl = base_path + ['acl', 'ip']
vlan = '200'
@@ -1567,6 +1570,9 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
list(acl_interfaces[0].acls)[: acl_interfaces[0].count], [acl_index]
)
+ # Cleanup
+ self.cli_delete(['interfaces', 'ethernet', interface, 'vif', vlan])
+
def test_23_2_vpp_acl_bond_with_vif(self):
base_acl = base_path + ['acl', 'ip']
base_bond = interfaces_path + ['bonding']
@@ -1718,6 +1724,36 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
self.cli_delete(['vrf', 'name', mgmt_vrf])
self.cli_commit()
+ def test_25_vpp_promisc_vlan(self):
+ # T9018: promiscuous mode must be enabled automatically when VLANs
+ # are configured on a VPP interface and disabled when removed.
+ vlan = '100'
+ address = '192.168.10.1/24'
+
+ self.cli_commit()
+
+ # Verify promisc is off initially
+ _, out = rc_cmd(f'sudo vppctl show hardware-interfaces {interface}')
+ self.assertNotRegex(out, r'flags:.*\bpromisc\b')
+
+ # Add VLAN sub-interface
+ self.cli_set(
+ ['interfaces', 'ethernet', interface, 'vif', vlan, 'address', address]
+ )
+ self.cli_commit()
+
+ # Verify promisc is enabled
+ _, out = rc_cmd(f'sudo vppctl show hardware-interfaces {interface}')
+ self.assertRegex(out, r'flags:.*\bpromisc\b')
+
+ # Remove VLAN sub-interface
+ self.cli_delete(['interfaces', 'ethernet', interface, 'vif'])
+ self.cli_commit()
+
+ # Verify promisc is disabled
+ _, out = rc_cmd(f'sudo vppctl show hardware-interfaces {interface}')
+ self.assertNotRegex(out, r'flags:.*\bpromisc\b')
+
if __name__ == '__main__':
unittest.main(verbosity=2, failfast=VyOSUnitTestSHIM.TestCase.debug_on())