if (!iface) {
return;
}
-
port = iface->port;
- if (port && port->n_ifaces > 1) {
- bond_link_status_update(iface,
- (reason != OFPPR_DELETE
- && !(opp->state & htonl(OFPPS_LINK_DOWN))));
- }
- if (reason != OFPPR_DELETE) {
+
+ if (reason == OFPPR_DELETE) {
+ VLOG_WARN("bridge %s: interface %s deleted unexpectedly",
+ br->name, iface->name);
+ iface_destroy(iface);
+ if (!port->n_ifaces) {
+ VLOG_WARN("bridge %s: port %s has no interfaces, deleting",
+ br->name, port->name);
+ port_destroy(port);
+ }
+ bridge_flush(br);
+ } else {
+ if (port->n_ifaces > 1) {
+ bool up = !(opp->state & htonl(OFPPS_LINK_DOWN));
+ bond_link_status_update(iface, up);
+ }
memcpy(iface->mac, opp->hw_addr, ETH_ADDR_LEN);
}
}