lkml.org 
[lkml]   [2022]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] samples/bpf: Fix sockex3: missing BPF prog type
Date
Thanks for your reply, actually, i tried another method, which can solved
this error, recognize "socket/xxx" as "socket". However, it maybe influence
other BPF prog or not? What do you think the following patch?

--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -8659,7 +8659,7 @@ static bool sec_def_matches(const struct bpf_sec_def *sec_def, const char *sec_n
return false;
}

- return strcmp(sec_name, sec_def->sec) == 0;
+ return strncmp(sec_name, sec_def->sec, len) == 0;
}

\
 
 \ /
  Last update: 2022-10-28 03:02    [W:0.049 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site