summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/conf_mode/interface-bonding.py3
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):