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);