X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Finterface_cli.c;h=2e5714c3c0f80ccb3a2c1fbe524ac632ed889c10;hb=196fce2b62c0d215722dd233aa8bf70a43aa0a66;hp=9de674a10fa13445c9ac2b8b69a9cf4640ab356a;hpb=9485d99bd3941b13abf7e47fc7e1d56f7b4fee55;p=vpp.git diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c index 9de674a10fa..2e5714c3c0f 100644 --- a/src/vnet/interface_cli.c +++ b/src/vnet/interface_cli.c @@ -52,6 +52,7 @@ #include #include #include +#include static int compare_interface_names (void *a1, void *a2) @@ -781,9 +782,6 @@ create_sub_interfaces (vlib_main_t * vm, continue; } - kp = clib_mem_alloc (sizeof (*kp)); - *kp = sup_and_sub_key; - template.type = VNET_SW_INTERFACE_TYPE_SUB; template.flood_class = VNET_FLOOD_CLASS_NORMAL; template.sup_sw_if_index = hi->sw_if_index; @@ -795,6 +793,9 @@ create_sub_interfaces (vlib_main_t * vm, if (error) goto done; + kp = clib_mem_alloc (sizeof (*kp)); + *kp = sup_and_sub_key; + hash_set (hi->sub_interface_sw_if_index_by_id, id, sw_if_index); hash_set_mem (im->sw_if_index_by_sup_and_sub, kp, sw_if_index); vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name, @@ -1953,7 +1954,7 @@ vnet_pcap_dispatch_trace_configure (vnet_pcap_dispatch_trace_args_t * a) /* Classify filter specified, but no classify filter configured */ if ((a->rx_enable + a->tx_enable + a->drop_enable) && a->filter && - (set->table_indices[0] == ~0)) + (set->table_indices == 0 || set->table_indices[0] == ~0)) return VNET_API_ERROR_NO_SUCH_LABEL; if (a->rx_enable + a->tx_enable + a->drop_enable)