Commit 8500db68 authored by Hillf Danton's avatar Hillf Danton Committed by Willy Tarreau

bonding: Fix slave selection bug.

The returned slave is incorrect, if the net device under check is not
charged yet by the master.
Signed-off-by: default avatarHillf Danton <dhillf@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit af3e5bd5)
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 48bff07f
......@@ -236,11 +236,11 @@ static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct n
bond_for_each_slave(bond, slave, i) {
if (slave->dev == slave_dev) {
break;
return slave;
}
}
return slave;
return 0;
}
static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment