From d9175e4626b0214d156065fbb83f9500cd2fd9dd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 21 Feb 2014 12:40:00 -0800 Subject: [PATCH] ofproto-dpif: Fix segfault removing port when STP is enabled. Reported-by: Sridhar Samudrala Tested-by: Sridhar Samudrala Signed-off-by: Ben Pfaff --- AUTHORS | 1 + ofproto/ofproto-dpif.c | 3 +++ 2 files changed, 4 insertions(+) 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); } -- 2.20.1