https://github.com/cilium/cilium
Revision ac408961bc3657d74932e73bb24aeb56974a5fb5 authored by Paul Chaignon on 31 May 2023, 08:59:12 UTC, committed by Sebastian Wicki on 13 June 2023, 19:22:04 UTC
[ upstream commit 9cc8a89f914195d52a8b3df021215b4051348b45 ]

Our logic to clean up old XFRM configs on node deletion currently relies
on the destination IP to identify the configs to remove. That doesn't
work with ENI and Azure IPAMs, but until recently, it didn't need to. On
ENI and Azure IPAMs we didn't have per-node XFRM configs.

That changed in commit 3e59b681f ("ipsec: Per-node XFRM states &
policies for EKS & AKS"). We now need to clean up per-node XFRM configs
for ENI and Azure IPAM modes as well, and we can't rely on the
destination IP for that because the XFRM policies don't match on that
destination IP.

Instead, since commit 73c36d45e0 ("ipsec: Match OUT XFRM states &
policies using node IDs"), we match the per-node XFRM configs using node
IDs encoded in the packet mark. The good news is that this is true for
all IPAM modes (whether Azure, ENI, cluster-pool, or something else).

So our cleanup logic can now rely on the node ID of the deleted node to
clean up its XFRM states and policies. This commit implements that.

Fixes: 3e59b681f ("ipsec: Per-node XFRM states & policies for EKS & AKS")
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
1 parent df1effa
History
Tip revision: ac408961bc3657d74932e73bb24aeb56974a5fb5 authored by Paul Chaignon on 31 May 2023, 08:59:12 UTC
ipsec: Fix leak of XFRM policies with ENI and Azure IPAMs
Tip revision: ac40896
File Mode Size
.github
.travis
Documentation
api
bpf
bugtool
cilium
cilium-health
clustermesh-apiserver
contrib
daemon
envoy
examples
hack
hubble-relay
images
install
jenkinsfiles
operator
pkg
plugins
proxylib
test
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.gitattributes -rw-r--r-- 301 bytes
.gitignore -rw-r--r-- 1.5 KB
.gitmodules -rw-r--r-- 0 bytes
.golangci.yaml -rw-r--r-- 3.3 KB
.mailmap -rw-r--r-- 5.0 KB
.travis.yml -rw-r--r-- 1.2 KB
AUTHORS -rw-r--r-- 26.3 KB
CHANGELOG.md -rw-r--r-- 151.8 KB
CODEOWNERS -rw-r--r-- 1.2 KB
CODE_OF_CONDUCT.md -rw-r--r-- 2.2 KB
CONTRIBUTING.md -rw-r--r-- 227 bytes
FURTHER_READINGS.rst -rw-r--r-- 4.9 KB
GO_VERSION -rw-r--r-- 8 bytes
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS.md -rw-r--r-- 3.8 KB
Makefile -rw-r--r-- 29.1 KB
Makefile.defs -rw-r--r-- 6.0 KB
Makefile.docker -rw-r--r-- 6.3 KB
Makefile.quiet -rw-r--r-- 788 bytes
README.rst -rw-r--r-- 15.0 KB
SECURITY.md -rw-r--r-- 615 bytes
USERS.md -rw-r--r-- 8.1 KB
VERSION -rw-r--r-- 8 bytes
Vagrantfile -rw-r--r-- 12.9 KB
go.mod -rw-r--r-- 10.9 KB
go.sum -rw-r--r-- 206.7 KB
netlify.toml -rw-r--r-- 92 bytes
stable.txt -rw-r--r-- 8 bytes
vagrant_box_defaults.rb -rw-r--r-- 394 bytes

README.rst

back to top