diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-06 10:54:50 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-06 10:54:50 +0200 |
commit | 5f87266d9ef3b72908b6f429e37df280f1be8cdf (patch) | |
tree | d47ab6cecd93e051a851f2aea337557f957b7e41 /src/conf_mode | |
parent | f9eff4fcdf30223638169e6ed5fa7ca49fcfa223 (diff) | |
download | vyos-1x-5f87266d9ef3b72908b6f429e37df280f1be8cdf.tar.gz vyos-1x-5f87266d9ef3b72908b6f429e37df280f1be8cdf.zip |
bonding: T1614: members are not allowed to be underlaying vxlan devices
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/interface-bonding.py | 7 |
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 {}' \ |