From: Ben Pfaff Date: Fri, 21 Feb 2014 20:40:00 +0000 (-0800) Subject: ofproto-dpif: Fix segfault removing port when STP is enabled. X-Git-Tag: v2.1.0~14 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=d9175e4626b0214d156065fbb83f9500cd2fd9dd;p=cascardo%2Fovs.git ofproto-dpif: Fix segfault removing port when STP is enabled. Reported-by: Sridhar Samudrala Tested-by: Sridhar Samudrala Signed-off-by: Ben Pfaff --- diff --git a/AUTHORS b/AUTHORS index fdb34e387..80756b2aa 100644 --- a/AUTHORS +++ b/AUTHORS @@ -229,6 +229,7 @@ Sean Brady sbrady@gtfservices.com Sebastian Andrzej Siewior sebastian@breakpoint.cc Sébastien RICCIO sr@swisscenter.com Spiro Kourtessis spiro@vmware.com +Sridhar Samudrala samudrala.sridhar@gmail.com Srini Seetharaman seethara@stanford.edu Stephen Hemminger shemminger@vyatta.com Stephen Finucane stephen.finucane@intel.com diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 3493fedf3..3778ca212 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -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); }