Ticket: CM-12355
Reviewed By: julien, nikhil
Testing Done: tested with failing config
This can happen if the bridge vlans were
cached before the interface become a bridge port.
and when the interface becomes a bridge port
kernel adds a default pvid of 1. so this patch
assumes a default pvid is 1 if we did not find
anything in the cache. This will delete
the default pvid of 1 if the user has configured a
different pvid.
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
if running_pvid:
if running_pvid != pvid_int and running_pvid != 0:
pvid_to_del = running_pvid
+ else:
+ # There cannot be a no running pvid.
+ # It might just not be in our cache:
+ # this can happen if at the time we were
+ # creating the bridge vlan cache, the port
+ # was not part of the bridge
+ running_pvid = 1
if (pvid_to_del and (pvid_to_del in vids_int) and
(pvid_to_del not in vids_to_add)):