ofproto-dpif: Fix segfault removing port when STP is enabled.
[cascardo/ovs.git] / ofproto / ofproto-dpif.c
index 3493fed..3778ca2 100644 (file)
@@ -1401,6 +1401,9 @@ port_destruct(struct ofport *port_)
     bundle_remove(port_);
     set_cfm(port_, NULL);
     set_bfd(port_, NULL);
+    if (port->stp_port) {
+        stp_port_disable(port->stp_port);
+    }
     if (ofproto->sflow) {
         dpif_sflow_del_port(ofproto->sflow, port->odp_port);
     }