Skip to content

fix(examples): return XDP_PASS for non-TCP/UDP packets in xdp-log - #277

Open
rootacite wants to merge 1 commit into
aya-rs:mainfrom
rootacite:fix-example-1
Open

fix(examples): return XDP_PASS for non-TCP/UDP packets in xdp-log#277
rootacite wants to merge 1 commit into
aya-rs:mainfrom
rootacite:fix-example-1

Conversation

@rootacite

@rootacite rootacite commented Jun 27, 2026

Copy link
Copy Markdown

Hi maintainers! Thanks for the awesome work on Aya.

While testing the xdp-log example, I noticed a slightly unexpected behavior. Currently, non-TCP/UDP IPv4 traffic (like ICMP) hits the _ => return Err(()) arm in try_xdp_firewall. This propagates to the outer function and returns xdp_action::XDP_ABORTED.

When the example is loaded, the host cannot be pinged (ICMP requests are unexpectedly dropped), and the kernel frequently triggers xdp_exception tracepoints for normal ICMP packets.

I'm wondering if this was an intentional design choice for demonstration purposes?

If it's a minor oversight, this PR changes it to early-return Ok(xdp_action::XDP_PASS). I've tested this locally: ICMP traffic recovers perfectly.

Thanks!


This change is Reviewable

@netlify

netlify Bot commented Jun 27, 2026

Copy link
Copy Markdown

Deploy Preview for aya-rs ready!

Name Link
🔨 Latest commit a8936c7
🔍 Latest deploy log https://app.netlify.com/projects/aya-rs/deploys/6a3f8f70f333f00008319d29
😎 Deploy Preview https://deploy-preview-277--aya-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant