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

addons: bridge: move the default running_pvid assignment to before

pvid_to_del is calculated

Ticket: CM-12355
Reviewed By: julien, nikhil
Testing Done: tested with failing config

My previous fix for the same bug did not fix the problem completly.
In this patch all running pvid calculation
is done before the pvid_to_del is calculated.
This makes sure the old pvid is deleted if it is not
the same as current pvid in all cases

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-08-11 22:36:39 -07:00
parent 3c705d7606
commit 07c1c00d39

View File

@ -886,10 +886,7 @@ class bridge(moduleBase):
(vids_to_del, vids_to_add) = \
self._diff_vids(vids_to_add, running_vids)
if running_pvid:
if running_pvid != pvid_int and running_pvid != 0:
pvid_to_del = running_pvid
else:
if not running_pvid:
# There cannot be a no running pvid.
# It might just not be in our cache:
# this can happen if at the time we were
@ -897,6 +894,10 @@ class bridge(moduleBase):
# was not part of the bridge
running_pvid = 1
if running_pvid:
if running_pvid != pvid_int and running_pvid != 0:
pvid_to_del = running_pvid
if (pvid_to_del and (pvid_to_del in vids_int) and
(pvid_to_del not in vids_to_add)):
# kernel deletes dont take into account