there we go. route cleanup sorted.
This commit is contained in:
parent
4cee007203
commit
b1456ae16a
@ -196,15 +196,16 @@ class TunnelBroker(object):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error('Could not set iface_idx for link {0}: {1}'.format(self.iface_name, e))
|
logger.error('Could not set iface_idx for link {0}: {1}'.format(self.iface_name, e))
|
||||||
raise e
|
raise e
|
||||||
try:
|
|
||||||
self.ipr.link('set', index = self.iface_idx, state = 'down')
|
|
||||||
except Exception as e:
|
|
||||||
logger.error('Could not bring down link {0}: {1} (continuing anyways)'.format(self.iface_name, e))
|
|
||||||
try:
|
try:
|
||||||
self.ipr.route('del', dst = 'default', oif = self.iface_idx, family = socket.AF_INET6)
|
self.ipr.route('del', dst = 'default', oif = self.iface_idx, family = socket.AF_INET6)
|
||||||
|
logger.debug('Removed default route for link {0}.'.format(self.iface_name))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(('Could not remove default IPv6 route on link {0}: '
|
logger.error(('Could not remove default IPv6 route on link {0}: '
|
||||||
'{1} (continuing anyways)').format(self.iface_name, e))
|
'{1} (continuing anyways)').format(self.iface_name, e))
|
||||||
|
try:
|
||||||
|
self.ipr.link('set', index = self.iface_idx, state = 'down')
|
||||||
|
except Exception as e:
|
||||||
|
logger.error('Could not bring down link {0}: {1} (continuing anyways)'.format(self.iface_name, e))
|
||||||
try:
|
try:
|
||||||
self.ipr.link('del', index = self.iface_idx)
|
self.ipr.link('del', index = self.iface_idx)
|
||||||
logger.debug('Deleted link {0}.'.format(self.iface_name))
|
logger.debug('Deleted link {0}.'.format(self.iface_name))
|
||||||
|
Loading…
Reference in New Issue
Block a user