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

addons: address: replay all gateway commands at every ifreload

Ticket: CM-14472
Reviewed By: Roopa, Julien
Testing Done: used the config mentioned in CM

Fix introduced by "addons: address: add both v4 and v6 gateways
instead of just one" changed the way gateway commands were configured.
ifupdown2 does not replay default gateway commands on ifreload

This patch ensures all the gateway commands at every ifreload are replayed

Signed-off-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>
This commit is contained in:
Nikhil
2017-01-17 17:55:35 -08:00
parent a3d36dd86d
commit 4b875c17c6

View File

@ -315,7 +315,7 @@ class address(moduleBase):
self.ipcmd.route_del_gateway(ifaceobj.name, del_gw, vrf, metric) self.ipcmd.route_del_gateway(ifaceobj.name, del_gw, vrf, metric)
except Exception as e: except Exception as e:
self.logger.debug('%s: %s' % (ifaceobj.name, str(e))) self.logger.debug('%s: %s' % (ifaceobj.name, str(e)))
for add_gw in list(set(gateways) - set(prev_gw)): for add_gw in gateways:
try: try:
self.ipcmd.route_add_gateway(ifaceobj.name, add_gw, vrf) self.ipcmd.route_add_gateway(ifaceobj.name, add_gw, vrf)
except Exception as e: except Exception as e: