From c6303ea11b76880306c12885a1007c516e40d1df Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 2 Oct 2009 18:08:05 -0700 Subject: [PATCH] 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 --- vswitchd/bridge.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); } -- 2.30.2