bridge_destroy(struct bridge *br)
{
if (br) {
- size_t i;
-
while (br->n_ports > 0) {
port_destroy(br->ports[br->n_ports - 1]);
}
list_remove(&br->node);
- free(br->name);
if (br->dp_idx >= 0) {
int retval = dpif_del_dp(&mgmt_dpif, br->dp_idx, NULL);
if (!retval || retval == ENOENT) {
}
process_destroy(br->secchan);
rconn_destroy(br->rconn);
- for (i = 0; i < br->n_ports; i++) {
- port_destroy(br->ports[i]);
- }
free(br->netflow_host);
free(br->controller);
svec_destroy(&br->secchan_opts);
mac_learning_destroy(br->ml);
port_array_destroy(&br->ifaces);
free(br->ports);
+ free(br->name);
free(br);
}
}
}
}
+ while (port->n_ifaces > 0) {
+ iface_destroy(port->ifaces[port->n_ifaces - 1]);
+ }
+
del = br->ports[port->port_idx] = br->ports[--br->n_ports];
del->port_idx = port->port_idx;
- for (i = 0; i < port->n_ifaces; i++) {
- iface_destroy(port->ifaces[i]);
- }
free(port->ifaces);
- free(port->trunks);
+ bitmap_free(port->trunks);
free(port->name);
free(port);
bridge_flush(br);
br->ports[i]->dst_mirrors &= ~(MIRROR_MASK_C(1) << m->idx);
}
+ svec_destroy(&m->src_ports);
+ svec_destroy(&m->dst_ports);
+ free(m->vlans);
+
m->bridge->mirrors[m->idx] = NULL;
free(m);