Skip to content

Commit

Permalink
bonding: Fix slave selection bug.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hillf Danton authored and David S. Miller committed Dec 16, 2010
1 parent 82cc4f5 commit af3e5bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/bonding/bonding.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,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)
Expand Down

0 comments on commit af3e5bd

Please sign in to comment.