the_bearded_skull
the_bearded_skull

Reputation: 73

eBPF: Pass metadata along with a socket redirection?

I am designing a low-level networking application that needs to efficiently redirect TCP traffic from an eBPF program to a userspace proxy that decides what policies to enforce on the connection.

This will looks something like:

  1. Outbound TCP connection to some virtual IP gets intercepted by eBPF program.
  2. The eBPF program resolves the destination virtual IP to an actual IP and performs some actions based on the actual IP.
  3. Here's where I could use some guidance- the outbound connection needs to be redirected to a userspace proxy and the proxy needs to know both the destination virtual IP and the actual IP resolved by the eBPF program.

How could the eBPF program redirect the connection to the userspace proxy in a way that makes both the original virtual IP and the resolved IP information available for policy enforcement?

Thanks in advance.

Upvotes: 0

Views: 54

Answers (0)

Related Questions