If a port is removed when spanning tree was configured on it, then the
system may crash, since the STP library will try to send packets out a
now non-existant port. This commit disables STP on ports when they are
destroyed.
---
vswitchd/bridge.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 6a25b95..dac1040 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2532,6 +2532,14 @@ port_destroy(struct port *port)
struct bridge *br = port->bridge;
struct iface *iface, *next;
+ /* Disable STP before unregistering the bundle, since it may
+ * update the bundle's state. */
+ if (br->cfg->stp_enable) {
+ LIST_FOR_EACH_SAFE (iface, next, port_elem, &port->ifaces) {
+ ofproto_port_set_stp(br->ofproto, iface->ofp_port, NULL);
+ }
+ }
+
if (br->ofproto) {
ofproto_bundle_unregister(br->ofproto, port);
}
--
1.7.1
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev