1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

addons: vrf: fix incorrect check when checking for running vs configured slaves

change 'or' to 'and'. Its valid for one of them to be null.
This was causing vrf enslavement errors during bootup.
This was a recent regression.

Closes: CM-9757
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-03-08 14:05:35 -08:00
parent 62f2caa46b
commit b94e4d24ea

View File

@ -240,7 +240,7 @@ class vrf(moduleBase):
def _add_vrf_slaves(self, ifaceobj): def _add_vrf_slaves(self, ifaceobj):
running_slaves = self.ipcmd.link_get_lowers(ifaceobj.name) running_slaves = self.ipcmd.link_get_lowers(ifaceobj.name)
config_slaves = ifaceobj.lowerifaces config_slaves = ifaceobj.lowerifaces
if not config_slaves or not running_slaves: if not config_slaves and not running_slaves:
return return
add_slaves = set(config_slaves).difference(set(running_slaves)) add_slaves = set(config_slaves).difference(set(running_slaves))
del_slaves = set(running_slaves).difference(set(config_slaves)) del_slaves = set(running_slaves).difference(set(config_slaves))