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

ifupdownmain: bridgevlan: dont squash vlan iface_types with ifaces of

the same name

Ticket: CM-10051
Reviewed By: julien, nikhil
Testing Done: tested that bridge vlan attributes get applied correctly + ran ssim test testifupdown2.py

This was introduced by a patch that squashed multiple iface objects
into a single object.

That led to the below interfaces getting squashed into one. Which is not
the right thing to do:

{noformat}
auto Newbr.325
iface Newbr.325
        address 24.0.0.22/30
        address 3101🔤bcad:1::3/64

auto Newbr.325
vlan Newbr.325
        bridge-igmp-querier-src 194.31.10.45
{noformat}

The 'vlan Newbr.325' ifaceobject needs to be kept separately and it is
of type BRIDGE_VLAN. so, this patch just makes sure these interfaces are
kept separately in the squash function.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-04-03 15:31:34 -07:00
parent d49a18d1b9
commit afb367d954

View File

@@ -696,7 +696,10 @@ class ifupdownMain(ifupdownBase):
if ifaceobj.compare(currentifaceobjlist[0]):
self.logger.warn('duplicate interface %s found' %ifaceobj.name)
return
currentifaceobjlist[0].squash(ifaceobj)
if ifaceobj.type == ifaceType.BRIDGE_VLAN:
self.ifaceobjdict[ifaceobj.name].append(ifaceobj)
else:
currentifaceobjlist[0].squash(ifaceobj)
def _save_iface(self, ifaceobj):
if self._check_config_no_repeats(ifaceobj):