From: Jesse Gross Date: Sat, 3 Oct 2009 01:08:05 +0000 (-0700) Subject: bonding: Update the link status on the bond fake interface. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6303ea11b76880306c12885a1007c516e40d1df;p=openvswitch bonding: Update the link status on the bond fake interface. Brings the fake bond interface up and down to match our notion of whether the bond is currently active. This solves an issue where XenCenter would always show the bond as disconnected. Bug #1703 --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 36be700d..f32d2baf 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2983,6 +2983,19 @@ port_update_bond_compat(struct port *port) memcpy(slave->mac, iface->mac, ETH_ADDR_LEN); } + if (cfg_get_bool(0, "bonding.%s.fake-iface", port->name)) { + struct netdev *bond_netdev; + + if (!netdev_open(port->name, NETDEV_ETH_TYPE_NONE, &bond_netdev)) { + if (bond.up) { + netdev_turn_flags_on(bond_netdev, NETDEV_UP, true); + } else { + netdev_turn_flags_off(bond_netdev, NETDEV_UP, true); + } + netdev_close(bond_netdev); + } + } + proc_net_compat_update_bond(port->name, &bond); free(bond.slaves); }