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

Fix refcnt issue when multiple iface stanzas were presented for a white

listed interface that had a blacklisted parent

Ticket: CM-7851
Reviewed By: CCR-3664
Testing Done: Tested with auto/non-auto dependent and non-dependent interfaces

example config from sam:

iface swp3.100

auto swp3
iface swp3

iface swp3
      address 66.66.66.66/24
This commit is contained in:
Roopa Prabhu
2015-10-20 14:30:53 -07:00
parent 7444feea6d
commit 397214a54a

View File

@@ -532,12 +532,13 @@ class ifupdownMain(ifupdownBase):
dlist = ifaceobj.lowerifaces
if dlist:
for d in dlist:
difaceobj = self.get_ifaceobj_first(d)
if not difaceobj:
difaceobjs = self.get_ifaceobjs(d)
if not difaceobjs:
continue
difaceobj.dec_refcnt()
try:
difaceobj.upperifaces.remove(i)
for d in difaceobjs:
d.dec_refcnt()
d.upperifaces.remove(i)
except:
self.logger.debug('error removing %s from %s upperifaces' %(i, d))
pass