summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2023-12-08 11:16:54 +0100
committerDamjan Marion <dmarion@0xa5.net>2023-12-14 16:29:53 +0000
commitbc67e9fd206ef3d6234960a61a7f9ab56a938ef2 (patch)
treee98ab163c36985f200dd2ac30b570e32c60e81c2 /src/plugins
parenta474bc8a3b4307869e97e6d76a8b06cfcebea49a (diff)
bpf_trace_filter: allow use whithout classifier
Change-Id: I7ac5693ca547fe7249e7b6297bade70a6052b169 Type: improvement Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/bpf_trace_filter/bpf_trace_filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/bpf_trace_filter/bpf_trace_filter.c b/src/plugins/bpf_trace_filter/bpf_trace_filter.c
index ff08d2cdb80..01d5b1e96a7 100644
--- a/src/plugins/bpf_trace_filter/bpf_trace_filter.c
+++ b/src/plugins/bpf_trace_filter/bpf_trace_filter.c
@@ -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)