diff options
author | Hillf Danton <dhillf@gmail.com> | 2010-12-10 18:54:11 +0000 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2013-06-10 11:43:27 +0200 |
commit | 8500db68e0a884c16b9c4ca5fcd6dabfbdcf7522 (patch) | |
tree | 4f939896fad5cdccd47d92aebb13973215b09a28 /drivers | |
parent | 48bff07f50471e3a64250e4cce39529999230dad (diff) |
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: Hillf Danton <dhillf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit af3e5bd5f650163c2e12297f572910a1af1b8236)
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/bonding.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 68247714466f..5d127fcc8cee 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -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) |