Change-Id: I7ac5693ca547fe7249e7b6297bade70a6052b169
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
struct pcap_pkthdr phdr = { 0 };
int res;
int res1;
- res1 = vnet_is_packet_traced (b, classify_table_index, 0);
- if (res1 != 1)
+ if (classify_table_index != ~0 &&
+ (res1 = vnet_is_packet_traced (b, classify_table_index, 0)) != 1)
return res1;
if (!bfm->prog_set)
goto done;
}
- u32 filter_table = classify_get_trace_chain ();
- if (filter && filter_table == ~0)
- {
- error = clib_error_create ("No packet trace filter configured...");
- goto done;
- }
-
trace_update_capture_options (add, node_index, filter, verbose);
done:
if (func != 0)
return -1;
+ if (classify_table_index == ~0)
+ return -1;
+
/* This will happen... */
if (pool_is_free_index (vcm->tables, classify_table_index))
return -1;