From eab44d2757b67fa8801e9bb147ccacd01b081f7d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 15 Feb 2020 19:51:48 +0100 Subject: bond: T2041: add missing consitency check on member interface existence --- src/conf_mode/interfaces-bonding.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/conf_mode/interfaces-bonding.py b/src/conf_mode/interfaces-bonding.py index ac4f213ec..81574515f 100755 --- a/src/conf_mode/interfaces-bonding.py +++ b/src/conf_mode/interfaces-bonding.py @@ -283,6 +283,10 @@ def verify(bond): conf = Config() for intf in bond['member']: + # check if member interface is "real" + if intf not in interfaces(): + raise ConfigError('interface {} does not exist!'.format(intf)) + # a bonding member interface is only allowed to be assigned to one bond! all_bonds = conf.list_nodes('interfaces bonding') # We do not need to check our own bond -- cgit v1.2.3