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

ifupdownaddons: iproute2: Fix for error while enslaving 'eth0' to a vrf

Ticket: CM-9594
Reviewed By: Roopa Prabhu
Testing Done: Yes, by installing ifupdown2 deb onto cel-e1031-01

This patch fixes the failure to execute the command
'ip link set dev eth0 nomaster' when 'eth0' is associated with any vrf

This patch also include a review comment update for CCR-4210
This commit is contained in:
Nikhil
2016-03-01 19:39:37 -08:00
parent 2b5894580b
commit 659097a03b
2 changed files with 9 additions and 8 deletions

View File

@@ -201,15 +201,16 @@ class vrf(moduleBase):
pref = 200
ip_rule_out_format = '%s: from all %s %s lookup %s'
ip_rule_cmd = 'ip %s rule add pref %s %s %s table %s'
try:
if self.vrf_fix_local_table:
self.vrf_fix_local_table = False
rule = '0: from all lookup local'
if rule in self.ip_rule_cache:
if self.vrf_fix_local_table:
self.vrf_fix_local_table = False
rule = '0: from all lookup local'
if rule in self.ip_rule_cache:
try:
self.exec_command('ip rule del pref 0')
self.exec_command('ip rule add pref 32765 table local')
except Exception, e:
self.logger.info('%s' %str(e))
except Exception, e:
self.logger.info('%s' %str(e))
pass
#Example ip rule
#200: from all oif blue lookup blue