summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-03 21:55:49 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-04 11:25:31 +0200
commitda2bb10b8e4c15aaf993fc82eb0f9b8c564a2113 (patch)
treefe85355f958443811ba3bc71631f0d11c8421489
parentca7e1b276878f503c63c1743c0f8aa3a5245ce31 (diff)
downloadvyos-1x-da2bb10b8e4c15aaf993fc82eb0f9b8c564a2113.tar.gz
vyos-1x-da2bb10b8e4c15aaf993fc82eb0f9b8c564a2113.zip
bonding: T1614: identical ID on vif and vif-s is not allowed
-rwxr-xr-xsrc/conf_mode/interface-bonding.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interface-bonding.py b/src/conf_mode/interface-bonding.py
index 9e7be19f5..c2f0086aa 100755
--- a/src/conf_mode/interface-bonding.py
+++ b/src/conf_mode/interface-bonding.py
@@ -361,6 +361,11 @@ def verify(bond):
if bond['primary'] not in bond['member']:
raise ConfigError('Interface "{}" is not part of the bond'.format(bond['primary']))
+ for vif_s in bond['vif_s']:
+ for vif in bond['vif']:
+ if vif['id'] == vif_s['id']:
+ raise ConfigError('Can not use identical ID on vif and vif-s interface')
+
return None