redbpf icon indicating copy to clipboard operation
redbpf copied to clipboard

feat: add XDP example for UDP port redirect

Open shaneutt opened this issue 3 years ago • 2 comments

The purpose of this PR is to add an XDP example of redirecting ports for UDP traffic.

This is not complete, and I'm not certain that this is the best or most idiomatic way to do this yet so I'm leaving this in draft for the moment in hopes of getting some input/suggestions from the maintainers.

shaneutt avatar Sep 21 '22 19:09 shaneutt

This looks like a passable approach to me, if it works, that's even better. Maybe @rhdxmr has some suggestions on improving it? Regardless, I'd be happy to merge it if you find this helpful!

rsdy avatar Sep 23 '22 15:09 rsdy

This looks like a passable approach to me, if it works, that's even better.

Thank you. I have tested this locally and it works. However I have yet to get it working with a redbpf userspace loader given the examples available in this repository. I was instead able to load and test it using the normal bpftool approach. This is why I didn't consider it complete yet.

shaneutt avatar Sep 23 '22 16:09 shaneutt