if (disable_flags)
bd_set_flags (vm, bd_index, disable_flags, 0 /* disable */ );
- bd_set_mac_age (vm, mp->mac_age, mp->mac_age);
+ bd_set_mac_age (vm, bd_index, mp->mac_age);
}
else
rv = bd_delete_bd_index (bdm, bd_id);
u32 encap_fib_index;
uword *p;
ip4_main_t *im = &ip4_main;
+ vnet_main_t *vnm = vnet_get_main ();
u32 sw_if_index = ~0;
p = hash_get (im->fib_index_by_table_id, ntohl (mp->encap_vrf_id));
goto out;
}
a->mcast_sw_if_index = ntohl (mp->mcast_sw_if_index);
+ if (ip46_address_is_multicast (&a->dst) &&
+ pool_is_free_index (vnm->interface_main.sw_interfaces,
+ a->mcast_sw_if_index))
+ {
+ rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
+ goto out;
+ }
a->encap_fib_index = encap_fib_index;
a->decap_next_index = ntohl (mp->decap_next_index);
a->vni = ntohl (mp->vni);