summaryrefslogtreecommitdiff
path: root/python/vyos/configverify.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos/configverify.py')
-rw-r--r--python/vyos/configverify.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index a888791ba..efcf403ce 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -209,6 +209,13 @@ def verify_vlan_config(config):
Common helper function used by interface implementations to perform
recurring validation of interface VLANs
"""
+
+ # VLAN and Q-in-Q IDs are not allowed to overlap
+ if 'vif' in config and 'vif_s' in config:
+ duplicate = list(set(config['vif']) & set(config['vif_s']))
+ if duplicate:
+ raise ConfigError(f'Duplicate VLAN id "{duplicate[0]}" used for vif and vif-s interfaces!')
+
# 802.1q VLANs
for vlan in config.get('vif', {}):
vlan = config['vif'][vlan]