fix: use the correct return value for cgroup_skb

`cgroup_skb` returns 0 will block traffic in the current direction.
An example program should not block traffic, this can cause difficulties for beginners.
pull/152/head
脑袋里进花生了 3 days ago committed by GitHub
parent 0fc3f2934e
commit b263338358
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -183,7 +183,7 @@ pub fn {{crate_name}}(ctx: SkBuffContext) -> i32 {
fn try_{{crate_name}}(ctx: SkBuffContext) -> Result<i32, i32> {
info!(&ctx, "received a packet");
Ok(0)
Ok(1)
}
{%- when "tracepoint" %}
use aya_ebpf::{macros::tracepoint, programs::TracePointContext};

Loading…
Cancel
Save