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

ifupdown: fixed bridge port pvid config on reboot

Ticket: CM-8161
Reviewed By: Roopa
Testing Done:

With vlan-aware bridge, when replacing a port's pvid, the kernel leaves
the port in the original pvid and relies on user space to explicitly
delete the port from that vlan if it is no longer a member of that.

ifupdown does that correctly in ifup and ifreload cases, but missed
removing the port from the default pvid during system reboot.  This
patch fixes that by removing the PERFMODE check specifically for pvid
that causes ifupdown to skip checking running config on reboot which
leads to the bug.

(cherry picked from commit 0461a3f3cc82691cd32b9f6dbefaacf7b23eaeea)
This commit is contained in:
Wilson Kok
2015-11-10 14:16:00 -08:00
parent 93b399fb8b
commit 159dd3e8ec

View File

@@ -450,8 +450,10 @@ class bridge(moduleBase):
if self._running_vidinfo_valid:
return self._running_vidinfo
self._running_vidinfo = {}
if not self.PERFMODE:
self._running_vidinfo = self.ipcmd.bridge_port_vids_get_all()
# CM-8161. Removed check for PERFMODE. Need the get in all cases
# including reboot, so that we can configure the pvid correctly.
self._running_vidinfo = self.ipcmd.bridge_port_vids_get_all()
self._running_vidinfo_valid = True
return self._running_vidinfo