Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TC_INGRESS UDP redirect program #23

Merged
merged 3 commits into from
Nov 14, 2022

Conversation

astoycos
Copy link
Member

@astoycos astoycos commented Nov 14, 2022

Add a new program which uses the bpf_redirect_neigh helper to redirect traffic from a host's main NIC to a container interface. To get this working make sure ip_forwarding is enabled on your kernel, and ensure there are no net-filter rules which could drop the incoming traffic.

TODO

@astoycos astoycos requested a review from shaneutt November 14, 2022 15:09
@shaneutt shaneutt self-assigned this Nov 14, 2022
shaneutt
shaneutt previously approved these changes Nov 14, 2022
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I added issues for the TODO items so we can follow up. This gets us a step closer to the Rust re-write, I'm going to merge this as is so we can continue hacking on it to plug it into the UDPRoute controller. 👍

Add types Backend and BackendKey
which are used in the BackendsMap
which is ultimately used by our
TC ingress program.

Signed-off-by: Andrew Stoycos <[email protected]>
Add Codgen bits to automatically generate rust
bindings for kernel specific network structs.

currently we only use

vec!["ethhdr", "iphdr", "udphdr"]

Signed-off-by: Andrew Stoycos <[email protected]>
Add a tc_ingress program which uses
the newer helper to forward traffic
from a main NIC to a container NIC.

TODO update userspace components to
actually use the new program.

Signed-off-by: Andrew Stoycos <[email protected]>
@shaneutt shaneutt merged commit 8a35c44 into kubernetes-sigs:main Nov 14, 2022
@shaneutt shaneutt linked an issue Nov 14, 2022 that may be closed by this pull request
3 tasks
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.

create the BACKEND data-structure and BACKENDS map
2 participants