]> git.proxmox.com Git - mirror_ifupdown2.git/commit
addons: mstpctl: bridge vlan-unaware: check brport running config before setting...
authorJulien Fortin <julien@cumulusnetworks.com>
Tue, 3 Jul 2018 16:40:05 +0000 (18:40 +0200)
committerJulien Fortin <julien@cumulusnetworks.com>
Thu, 13 Dec 2018 22:43:57 +0000 (14:43 -0800)
commit4b0b3fa3a0be98322a931b993c8609f15c94299a
tree5d150256cfed6c37b2fe6f4bbe89b1e447eb9f5d
parentc8e0a11ed19f202eabba3f149ff0576af4f2a5ba
addons: mstpctl: bridge vlan-unaware: check brport running config before setting attributes

when handling mstpctl attribute on vlan-unaware bridges we don't
check the running configuration of the bridge ports (cache) thus
misconfiguring some attributes on brports.

We first create a traditional bridge with:

auto bridge1
iface bridge1
    bridge-ports swp1 swp2
    bridge-vlan-aware no
We check the setting:

$ mstpctl showportdetail bridge1 swp1 | grep edge
  admin edge port    no                      auto edge port       yes
  oper edge port     yes                     topology change ack  no
We then add the setting for swp1:

auto swp1
iface swp1
    mstpctl-portautoedge no
We then do an ifreload -adv and we see two calls. First
info: executing /sbin/mstpctl setportautoedge bridge1 swp1 no

and then a little later
info: executing /sbin/mstpctl setportautoedge bridge1 swp1 yes

Reviewed-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ifupdown2/addons/mstpctl.py