band: Fix error in bond_choose_output_slave() function.
authorAlex Wang <alexw@nicira.com>
Mon, 12 Aug 2013 21:14:52 +0000 (14:14 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 12 Aug 2013 21:01:23 +0000 (14:01 -0700)
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 <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/bond.c

index a9278db..3834774 100644 (file)
@@ -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;
 }
 \f
 /* Rebalancing. */