]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
ifupdown: fixed bridge port pvid config on reboot
authorWilson Kok <wkok@cumulusnetworks.com>
Tue, 10 Nov 2015 22:16:00 +0000 (14:16 -0800)
committerWilson Kok <wkok@cumulusnetworks.com>
Tue, 10 Nov 2015 22:27:43 +0000 (14:27 -0800)
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

index 36b630be4ff92d2d5bc0496dc5db29a42f898443..307c5bee9876c75263e98cb1e6e03c2c53285bd7 100644 (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