svec_destroy(&want_ifaces);
svec_destroy(&add_ifaces);
}
- LIST_FOR_EACH_SAFE (br, next, struct bridge, node, &all_bridges) {
+ LIST_FOR_EACH (br, struct bridge, node, &all_bridges) {
+ uint8_t ea[8];
+ uint64_t dpid;
+ struct iface *local_iface = NULL;
+ const char *devname;
+ struct svec nf_hosts;
+
bridge_fetch_dp_ifaces(br);
for (i = 0; i < br->n_ports; ) {
struct port *port = br->ports[i];
- struct iface *local_iface = NULL;
- const char *devname;
- uint8_t ea[8];
- uint64_t dpid;
- struct svec nf_hosts;
for (j = 0; j < port->n_ifaces; ) {
struct iface *iface = port->ifaces[j];
port_destroy(port);
continue;
}
+ i++;
+ }
- /* Pick local port hardware address, datapath ID. */
- bridge_pick_local_hw_addr(br, ea, &devname);
- if (local_iface) {
- int error = netdev_nodev_set_etheraddr(local_iface->name, ea);
- if (error) {
- static struct vlog_rate_limit rl
- = VLOG_RATE_LIMIT_INIT(1, 5);
- VLOG_ERR_RL(&rl, "bridge %s: failed to set bridge "
- "Ethernet address: %s",
- br->name, strerror(error));
- }
+ /* Pick local port hardware address, datapath ID. */
+ bridge_pick_local_hw_addr(br, ea, &devname);
+ if (local_iface) {
+ int error = netdev_nodev_set_etheraddr(local_iface->name, ea);
+ if (error) {
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
+ VLOG_ERR_RL(&rl, "bridge %s: failed to set bridge "
+ "Ethernet address: %s",
+ br->name, strerror(error));
}
+ }
- dpid = bridge_pick_datapath_id(br, ea, devname);
- ofproto_set_datapath_id(br->ofproto, dpid);
-
- /* Set NetFlow configuration on this bridge. */
- svec_init(&nf_hosts);
- cfg_get_all_keys(&nf_hosts, "netflow.%s.host", br->name);
- if (ofproto_set_netflow(br->ofproto, &nf_hosts)) {
- VLOG_ERR("bridge %s: problem setting netflow collectors",
- br->name);
- }
+ dpid = bridge_pick_datapath_id(br, ea, devname);
+ ofproto_set_datapath_id(br->ofproto, dpid);
- /* Set the controller. (It would be more straightforward to do
- * this in bridge_reconfigure_one(), but then the
- * ofproto_set_datapath_id() above would disconnect right away, and
- * we can't call ofproto_set_datapath_id() until we know the set of
- * ports actually in the bridge, hence not until now.) */
- ofproto_set_controller(br->ofproto, br->controller);
- i++;
+ /* Set NetFlow configuration on this bridge. */
+ svec_init(&nf_hosts);
+ cfg_get_all_keys(&nf_hosts, "netflow.%s.host", br->name);
+ if (ofproto_set_netflow(br->ofproto, &nf_hosts)) {
+ VLOG_ERR("bridge %s: problem setting netflow collectors",
+ br->name);
}
+
+ /* Set the controller. (It would be more straightforward to do
+ * this in bridge_reconfigure_one(), but then the
+ * ofproto_set_datapath_id() above would disconnect right away, and
+ * we can't call ofproto_set_datapath_id() until we know the set of
+ * ports actually in the bridge, hence not until now.) */
+ ofproto_set_controller(br->ofproto, br->controller);
}
LIST_FOR_EACH (br, struct bridge, node, &all_bridges) {
for (i = 0; i < br->n_ports; i++) {