From: Ben Pfaff Date: Tue, 30 Dec 2008 21:53:18 +0000 (-0800) Subject: vswitchd: Don't try to delete local port from datapath. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b2ffd3cfa92537196e43d47c6cc9c20ab41e8e0;p=openvswitch vswitchd: Don't try to delete local port from datapath. The local port (OFFP_LOCAL) is fixed in place and can't be deleted, so don't try. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index fc6bc631..fc733536 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -263,10 +263,14 @@ bridge_reconfigure(void) svec_diff(&want_ifaces, &cur_ifaces, NULL, NULL, &del_ifaces); for (i = 0; i < del_ifaces.n; i++) { const char *if_name = del_ifaces.names[i]; - int retval = dpif_del_port(&mgmt_dpif, br->dp_idx, if_name); - if (retval) { - VLOG_ERR("failed to remove %s interface from nl:%d: %s", - if_name, br->dp_idx, strerror(retval)); + if (strcmp(if_name, br->name)) { + int retval = dpif_del_port(&mgmt_dpif, br->dp_idx, if_name); + if (retval) { + VLOG_ERR("failed to remove %s interface from nl:%d: %s", + if_name, br->dp_idx, strerror(retval)); + } + } else { + /* Can't remove local port. */ } } svec_destroy(&cur_ifaces);