From 0b2ffd3cfa92537196e43d47c6cc9c20ab41e8e0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 30 Dec 2008 13:53:18 -0800 Subject: [PATCH] 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. --- vswitchd/bridge.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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); -- 2.30.2