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

addons: vrf: fix link-down yes on vrf slaves

because of a typo (use of wrong object) we weren't looking at the correct
ifaceobj for LINK_DOWN lookup. In some cases we didn't honor link-down yes
on VRF slaves

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
Julien Fortin
2018-12-06 10:40:48 -08:00
parent b067bba9b9
commit e7206159ed

View File

@@ -675,11 +675,11 @@ class vrf(moduleBase):
for s in config_slaves:
try:
for slave_ifaceobj in ifaceobj_getfunc(s) or []:
if ifaceobj.link_privflags & ifaceLinkPrivFlags.KEEP_LINK_DOWN:
raise Exception('%s: slave configured with link-down yes')
if slave_ifaceobj.link_privflags & ifaceLinkPrivFlags.KEEP_LINK_DOWN:
raise Exception("link-down yes: keeping VRF slave down")
netlink.link_set_updown(s, "up")
except Exception, e:
self.logger.debug('%s: %s' % (ifaceobj.name, str(e)))
self.logger.debug("%s: %s" % (s, str(e)))
pass
def _set_vrf_dev_processed_flag(self, ifaceobj):