-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.feature/egress-gatewayImpacts the egress IP gateway feature.Impacts the egress IP gateway feature.kind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.
Description
When the egress IP is assigned to a different interface than the one with the default route, we'll have to install additional IP rules and routes to steer the traffic to the correct interface.
That's because the network stack routes packets before the TC egress hook (i.e. where bpf SNAT happens), which means can't match traffic on the egress IP. We instead need to explicitly match each combination of source (endpoints) IPs and destination CIDRs.
@pchaigno suggested we might want to look into switching to bpf_fib_lookup
+ bpf_redirect
after the packet has been SNATed with the egress IP as that would allow to match the source/egress IP without the need for all the special IP rules/routes.
Metadata
Metadata
Assignees
Labels
area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.feature/egress-gatewayImpacts the egress IP gateway feature.Impacts the egress IP gateway feature.kind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.