diff options
author | Justin Pettit <jpettit@nicira.com> | 2009-09-14 04:07:53 -0700 |
---|---|---|
committer | Justin Pettit <jpettit@nicira.com> | 2009-09-14 09:42:21 -0700 |
commit | 2e8873af89047bc4093ad8f2755867af632b9363 (patch) | |
tree | e0f9b31ffcea436e59d74e4967e5c7304ea2bb80 /vswitchd/bridge.c | |
parent | 30a2c8b16234daf7b089372cc136b872f2e543d7 (diff) |
vswitch: Correctly identify slave status in /proc compatibility layer
In the /proc compatibility layer, the bond member was reported as up
immediately after link recovery, regardless of the updelay. I believe
the compatibility code was correct if the check had been done with carrier,
but since 'iface->enabled' already does that calculation, we can use it
directly.
Additinally, when a bond slave was enabled or disabled, the bond
compatibility code was not being told to update its state. This commit
makes that call.
NIC-39
Diffstat (limited to 'vswitchd/bridge.c')
-rw-r--r-- | vswitchd/bridge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index b13ed8dc..c39670a3 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1525,6 +1525,7 @@ bond_enable_slave(struct iface *iface, bool enable) } iface->tag = tag_create_random(); } + port_update_bond_compat(port); } static void @@ -2977,8 +2978,7 @@ port_update_bond_compat(struct port *port) struct iface *iface = port->ifaces[i]; struct compat_bond_slave *slave = &bond.slaves[i]; slave->name = iface->name; - slave->up = ((iface->enabled && iface->delay_expires == LLONG_MAX) || - (!iface->enabled && iface->delay_expires != LLONG_MAX)); + slave->up = iface->enabled; if (slave->up) { bond.up = true; } |