From: Ethan Jackson Date: Fri, 4 Mar 2011 18:59:40 +0000 (-0800) Subject: vswitchd: Initialize configuration on active-backup bonds. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55eccb868b8f1da858a9f724335b5bb059276497;hp=9fe215f0f65c77593436e920cd07cf9bb24a7db8;p=openvswitch vswitchd: Initialize configuration on active-backup bonds. Some configuration settings which were not balance-[slb|tcp] specific were only initialized for these bond types. Bug #4806. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index eadafb0a..1558d3bb 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -4527,6 +4527,8 @@ port_update_bonding(struct port *port) free(port->bond_hash); port->bond_hash = NULL; port->bond_fake_iface = false; + port->active_iface = -1; + port->no_ifaces_tag = 0; } else { size_t i; @@ -4537,19 +4539,25 @@ port_update_bonding(struct port *port) e->iface_idx = -1; e->tx_bytes = 0; } - port->no_ifaces_tag = tag_create_random(); - bond_choose_active_iface(port); port->bond_next_rebalance = time_msec() + port->bond_rebalance_interval; - - if (port->cfg->bond_fake_iface) { - port->bond_next_fake_iface_update = time_msec(); - } } else if (port->bond_mode == BM_AB) { free(port->bond_hash); port->bond_hash = NULL; } + + if (!port->no_ifaces_tag) { + port->no_ifaces_tag = tag_create_random(); + } + + if (port->active_iface < 0) { + bond_choose_active_iface(port); + } + port->bond_fake_iface = port->cfg->bond_fake_iface; + if (port->bond_fake_iface) { + port->bond_next_fake_iface_update = time_msec(); + } if (!port->miimon) { port->monitor = netdev_monitor_create();