mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
batman_adv: Ignore non-existing batman interface when setting up batman iface.
Previously a single non existing batman member interface could prevent the configuration of the batman interface. This patch makes sure only existing member interfaces will be considered when setting up the interface. Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
This commit is contained in:
committed by
Julien Fortin
parent
a8c175f91f
commit
6bfea931ff
@@ -125,14 +125,20 @@ class batman_adv (moduleBase):
|
||||
|
||||
|
||||
def _up (self, ifaceobj):
|
||||
batman_ifaces = self._get_batman_ifaces (ifaceobj)
|
||||
if batman_ifaces == None:
|
||||
if self._get_batman_ifaces (ifaceobj) == None:
|
||||
raise Exception ('could not determine batman interfacaes')
|
||||
|
||||
# Verify existance of batman interfaces (should be present already)
|
||||
for iface in batman_ifaces:
|
||||
batman_ifaces = []
|
||||
for iface in self._get_batman_ifaces (ifaceobj):
|
||||
if not self.ipcmd.link_exists (iface):
|
||||
raise Exception ('batman iface %s not present' % iface)
|
||||
self.logger.warn ('batman iface %s not present' % iface)
|
||||
continue
|
||||
|
||||
batman_ifaces.append (iface)
|
||||
|
||||
if len (batman_ifaces) == 0:
|
||||
raise Exception ("None of the configured batman interfaces are available!")
|
||||
|
||||
if_ignore_re = self._get_batman_ifaces_ignore_regex (ifaceobj)
|
||||
# Is the batman main interface already present?
|
||||
|
Reference in New Issue
Block a user