bpf_trace_filter: allow use whithout classifier

Change-Id: I7ac5693ca547fe7249e7b6297bade70a6052b169
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
This commit is contained in:
Mohammed Hawari
2023-12-08 11:16:54 +01:00
committed by Damjan Marion
parent a474bc8a3b
commit bc67e9fd20
3 changed files with 5 additions and 9 deletions
@@ -64,9 +64,9 @@ bpf_is_packed_traced (vlib_buffer_t *b, u32 classify_table_index, int func)
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)