Skip to content

Commit

Permalink
fix: update selector_filter index assignment to use sel->index
Browse files Browse the repository at this point in the history
Signed-off-by: arthur-zhang <[email protected]>
  • Loading branch information
arthur-zhang committed Dec 24, 2024
1 parent c3df31c commit 14ca790
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bpf/process/pfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,19 @@ selector_match(__u32 *f, struct selector_filter *sel,
four:
res4 = process_filter(sel, f, enter, &msg->ns, &msg->caps);
index = next_pid_value(index, f, ty);
sel->index = index;
three:
res3 = process_filter(sel, f, enter, &msg->ns, &msg->caps);
index = next_pid_value(index, f, ty);
sel->index = index;
two:
res2 = process_filter(sel, f, enter, &msg->ns, &msg->caps);
index = next_pid_value(index, f, ty);
sel->index = index;
one:
res1 = process_filter(sel, f, enter, &msg->ns, &msg->caps);
index = next_pid_value(index, f, ty);
sel->index = index;

if (ty == op_filter_notin)
return res1 & res2 & res3 & res4;
Expand Down

0 comments on commit 14ca790

Please sign in to comment.