From: Alex Wang Date: Mon, 12 Aug 2013 21:14:52 +0000 (-0700) Subject: band: Fix error in bond_choose_output_slave() function. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b5d5d7d33219225e050cc59b1785f2b6f40e8bd9;hp=5d389d55c78a20bd18b68b35f0e6cabae2686dcb;p=sliver-openvswitch.git band: Fix error in bond_choose_output_slave() function. This commit fixes the error introduced by commit 4a1b8f30e59 (bond: Stop using tags.). The error is caused by mistakenly returning 'slave' where 'slave->aux' should be returned. Signed-off-by: Alex Wang Signed-off-by: Ben Pfaff --- diff --git a/lib/bond.c b/lib/bond.c index a9278db84..3834774d4 100644 --- a/lib/bond.c +++ b/lib/bond.c @@ -661,11 +661,14 @@ bond_choose_output_slave(struct bond *bond, const struct flow *flow, struct flow_wildcards *wc, uint16_t vlan) { struct bond_slave *slave; + void *aux; ovs_rwlock_rdlock(&rwlock); slave = choose_output_slave(bond, flow, wc, vlan); + aux = slave ? slave->aux : NULL; ovs_rwlock_unlock(&rwlock); - return slave; + + return aux; } /* Rebalancing. */