aboutsummaryrefslogtreecommitdiff
path: root/lib/bond.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-04-18 16:17:46 -0700
committerEthan Jackson <ethan@nicira.com>2011-04-18 16:30:30 -0700
commit244b2160105d5ca7c5160f75680dc2ed01134c36 (patch)
tree24671ea9fe9b202bc1183be11aa934b71fc4952d /lib/bond.c
parent70f25ec2c348d8761b21f3973556b738f5d61a75 (diff)
bond: Fix ugly warnings at slave registration.
Before this patch, when a slave was registered for this first time the following warning would display. interface (null): enabled This is because the slave was enabled before having its name configured.
Diffstat (limited to 'lib/bond.c')
-rw-r--r--lib/bond.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bond.c b/lib/bond.c
index d826c332..d3b0e30a 100644
--- a/lib/bond.c
+++ b/lib/bond.c
@@ -376,6 +376,8 @@ bond_slave_register(struct bond *bond, void *slave_, uint16_t stb_id,
slave->aux = slave_;
slave->delay_expires = LLONG_MAX;
slave->up = bond_is_link_up(bond, netdev);
+ slave->name = xstrdup(netdev_get_name(netdev));
+
slave->enabled = false;
bond_enable_slave(slave, slave->up, NULL);
}