Merge remote-tracking branch 'ovs-dev/master'
[sliver-openvswitch.git] / lib / bond.c
index 198db0f..b3ae0c4 100644 (file)
@@ -195,8 +195,10 @@ bond_ref(const struct bond *bond_)
 {
     struct bond *bond = CONST_CAST(struct bond *, bond_);
 
-    ovs_assert(bond->ref_cnt > 0);
-    bond->ref_cnt++;
+    if (bond) {
+        ovs_assert(bond->ref_cnt > 0);
+        bond->ref_cnt++;
+    }
     return bond;
 }
 
@@ -1397,12 +1399,12 @@ choose_output_slave(const struct bond *bond, const struct flow *flow,
             return NULL;
         }
         if (wc) {
-            flow_mask_hash_fields(wc, NX_HASH_FIELDS_SYMMETRIC_L4);
+            flow_mask_hash_fields(flow, wc, NX_HASH_FIELDS_SYMMETRIC_L4);
         }
         /* Fall Through. */
     case BM_SLB:
         if (wc) {
-            flow_mask_hash_fields(wc, NX_HASH_FIELDS_ETH_SRC);
+            flow_mask_hash_fields(flow, wc, NX_HASH_FIELDS_ETH_SRC);
         }
         e = lookup_bond_entry(bond, flow, vlan);
         if (!e->slave || !e->slave->enabled) {