summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-06 10:54:50 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-06 10:54:50 +0200
commit5f87266d9ef3b72908b6f429e37df280f1be8cdf (patch)
treed47ab6cecd93e051a851f2aea337557f957b7e41
parentf9eff4fcdf30223638169e6ed5fa7ca49fcfa223 (diff)
downloadvyos-1x-5f87266d9ef3b72908b6f429e37df280f1be8cdf.tar.gz
vyos-1x-5f87266d9ef3b72908b6f429e37df280f1be8cdf.zip
bonding: T1614: members are not allowed to be underlaying vxlan devices
-rwxr-xr-xsrc/conf_mode/interface-bonding.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conf_mode/interface-bonding.py b/src/conf_mode/interface-bonding.py
index acf088de8..bce8f98fb 100755
--- a/src/conf_mode/interface-bonding.py
+++ b/src/conf_mode/interface-bonding.py
@@ -306,6 +306,13 @@ def verify(bond):
raise ConfigError('can not enslave interface {} which belongs to ' \
'pseudo-ethernet {}'.format(intf, tmp))
+ # bond members are not allowed to be underlaying vxlan devices
+ for tmp in conf.list_nodes('interfaces vxlan'):
+ if conf.exists('interfaces vxlan ' + tmp + ' link ' + intf):
+ raise ConfigError('can not enslave interface {} which belongs to ' \
+ 'vxlan {}'.format(intf, tmp))
+
+
if bond['primary']:
if bond['primary'] not in bond['member']:
raise ConfigError('primary interface must be a member interface of {}' \