mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-10-28 19:24:04 +08:00
fix: print TCP header length as unsigned
This commit is contained in:
@@ -107,7 +107,7 @@ int xdp_pass(struct xdp_md *ctx)
|
||||
bpf_ringbuf_submit(event, 0);
|
||||
|
||||
// Optional: Print a debug message (will appear in kernel logs)
|
||||
bpf_printk("Captured TCP header (%d bytes)", tcp_header_bytes);
|
||||
bpf_printk("Captured TCP header (%u bytes)", tcp_header_bytes);
|
||||
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user