-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
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.area/kernelRequires upstream work in the Linux kernel.Requires upstream work in the Linux kernel.feature/snatRelates to SNAT or Masquerading of trafficRelates to SNAT or Masquerading of traffickind/featureThis introduces new functionality.This introduces new functionality.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.
Description
Currently, the BPF-based SNAT uses IPV4_MASQUERADE
addr for SNAT'ing. This works fine as long as there is a single global scope IP addr. However, if we add multiple IP addrs then only one will be selected.
To improve the selection we could do the bpf_fib_lookup()
to determine src IP addr instead. This would also eliminate the IPV4_MASQUERADE
. However, the kernel helper might need to be relaxed, as currently it errors out if no L2 neigh entry is found for a nexthop of the given dst IP addr.
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.area/kernelRequires upstream work in the Linux kernel.Requires upstream work in the Linux kernel.feature/snatRelates to SNAT or Masquerading of trafficRelates to SNAT or Masquerading of traffickind/featureThis introduces new functionality.This introduces new functionality.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.