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

[v3.27] Fix incorrect cleanup of policy maps. #8231

Merged
merged 1 commit into from Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion felix/dataplane/linux/bpf_ep_mgr.go
Expand Up @@ -1124,13 +1124,19 @@ func (m *bpfEndpointManager) syncIfStateMap() {
// about as we will not hear about that device again.
for _, fn := range []func() int{
v.XDPPolicy,
} {
if idx := fn(); idx != -1 {
_ = jumpMapDeleteEntry(m.bpfmaps.XDPJumpMap, idx)
}
}
for _, fn := range []func() int{
v.IngressPolicy,
v.EgressPolicy,
v.TcIngressFilter,
v.TcEgressFilter,
} {
if idx := fn(); idx != -1 {
_ = jumpMapDeleteEntry(m.bpfmaps.XDPJumpMap, idx)
_ = jumpMapDeleteEntry(m.bpfmaps.JumpMap, idx)
}
}
} else {
Expand Down