diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-03 14:56:21 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-04 11:25:31 +0200 |
commit | 3fad8f2f74224502018c5e53b5931251595ad3b7 (patch) | |
tree | c38bd5ac0a83d10dac857206125b86ec2a0952c8 /src/conf_mode | |
parent | 6205c4d6701bda5f8a859291a5e152e009252301 (diff) | |
download | vyos-1x-3fad8f2f74224502018c5e53b5931251595ad3b7.tar.gz vyos-1x-3fad8f2f74224502018c5e53b5931251595ad3b7.zip |
bonding: T1614: can not set primary interface when it's not part of the bond
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/interface-bonding.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/interface-bonding.py b/src/conf_mode/interface-bonding.py index 6cd8fdc56..b150578e3 100755 --- a/src/conf_mode/interface-bonding.py +++ b/src/conf_mode/interface-bonding.py @@ -302,6 +302,9 @@ def verify(bond): if bond['mode'] not in ['active-backup', 'balance-tlb', 'balance-alb']: raise ConfigError('Mode dependency failed, primary not supported in this mode.'.format()) + if bond['primary'] not in bond['member']: + raise ConfigError('Interface "{}" is not part of the bond'.format(bond['primary'])) + return None def generate(bond): |