vnet_pcap_dispatch_trace_configure (vnet_pcap_dispatch_trace_args_t * a)
{
vlib_main_t *vm = vlib_get_main ();
- vnet_pcap_t *pp = &vm->pcap;
+ vnet_main_t *vnm = vnet_get_main ();
+ vnet_pcap_t *pp = &vnm->pcap;
pcap_main_t *pm = &pp->pcap_main;
vnet_classify_main_t *cm = &vnet_classify_main;
/* Classify filter specified, but no classify filter configured */
if ((a->rx_enable + a->tx_enable + a->drop_enable) && a->filter &&
- cm->classify_table_index_by_sw_if_index[0] == ~0)
+ (!cm->classify_table_index_by_sw_if_index ||
+ cm->classify_table_index_by_sw_if_index[0] == ~0))
return VNET_API_ERROR_NO_SUCH_LABEL;
if (a->rx_enable + a->tx_enable + a->drop_enable)