{
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;
}
{
struct bond_slave *slave = bond_slave_lookup(bond, slave_);
+ if (!slave) {
+ return BV_DROP;
+ }
+
/* LACP bonds have very loose admissibility restrictions because we can
* assume the remote switch is aware of the bond and will "do the right
* thing". However, as a precaution we drop packets on disabled slaves
/* Drop all multicast packets on inactive slaves. */
if (eth_addr_is_multicast(eth_dst)) {
*tags |= bond_get_active_slave_tag(bond);
- if (bond->active_slave != bond_slave_lookup(bond, slave_)) {
+ if (bond->active_slave != slave) {
return BV_DROP;
}
}
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) {