Skip to content

Commit

Permalink
Fix return code
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Oct 30, 2023
1 parent 9f7d3ea commit 82b745f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bpf/ringbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ struct
SEC("xdp/bpf_ringbuf_output") int output(void* ctx)
{
char msg[] = "Hello, World!";
return bpf_ringbuf_output(&map, msg, sizeof(msg), 0);
if (bpf_ringbuf_output(&map, msg, sizeof(msg), 0) < 0) {
return 1;
} else {
return 0;
}
}

0 comments on commit 82b745f

Please sign in to comment.