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

addons: vrf: fix check in vrf map initialization when no running vrfs present

Ticket: CM-10178
Review: trivial
Testing: tested with failing testcase in the CM

This patch fixes a check in vrf map initialization code which did
not account for running vrfs correctly. This caused the case where
there were no running vrfs but stale map file to fail.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-04-19 15:25:23 -07:00
parent 7b2e838e95
commit 4934af352a

View File

@@ -145,7 +145,7 @@ class vrf(moduleBase):
if table: if table:
running_vrf_map[int(table)] = v running_vrf_map[int(table)] = v
if running_vrf_map and (running_vrf_map != self.iproute2_vrf_map): if (not running_vrf_map or (running_vrf_map != self.iproute2_vrf_map)):
self.iproute2_vrf_map = running_vrf_map self.iproute2_vrf_map = running_vrf_map
iproute2_vrf_map_force_rewrite = True iproute2_vrf_map_force_rewrite = True