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

Fix link_type flag for objects read from state file + fix link_type

initializations in a few other places

Ticket: CM-4610
Reviewed By:
Testing Done: Tested with the failing sequence of events described in
the bug
This commit is contained in:
Roopa Prabhu
2014-12-31 13:58:25 -08:00
parent cebe79c93a
commit f3b69969e3
3 changed files with 4 additions and 2 deletions

View File

@@ -871,7 +871,7 @@ class bridge(moduleBase):
proc_file = ('/proc/sys/net/ipv6/conf/%s' %p +
'/disable_ipv6')
self.write_file(proc_file, '0')
if ifaceobj.link_type == ifaceLinkType.LINK_MASTER:
if ifaceobj.link_type != ifaceLinkType.LINK_NA:
rtnetlink_api.rtnl_api.link_set(p, "down")
except Exception, e:
self.log_error(str(e))

View File

@@ -430,7 +430,7 @@ class iface():
self.priv_flags = 0
self.raw_config = []
self.flags |= self._PICKLED
self.link_type = ifaceLinkType.LINK_UNKNOWN
self.link_type = ifaceLinkType.LINK_NA
self.link_kind = ifaceLinkKind.UNKNOWN
def dump_raw(self, logger):

View File

@@ -299,6 +299,8 @@ class ifupdownMain(ifupdownBase):
ifaceobj.name = ifacename
ifaceobj.priv_flags = priv_flags
ifaceobj.auto = True
if not self._link_master_slave:
ifaceobj.link_type = ifaceLinkType.LINK_NA
if increfcnt:
ifaceobj.inc_refcnt()
self.ifaceobjdict[ifacename] = [ifaceobj]