From 159dd3e8ec5cec3174e25ee51b58d7dab180ac0f Mon Sep 17 00:00:00 2001 From: Wilson Kok Date: Tue, 10 Nov 2015 14:16:00 -0800 Subject: [PATCH] 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) --- addons/bridge.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/bridge.py b/addons/bridge.py index 36b630b..307c5be 100644 --- a/addons/bridge.py +++ b/addons/bridge.py @@ -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 -- 2.39.5