Skip to content

fix(map): defer haveBatchAPI check in BatchLookupCmd until syscall fails#2017

Open
s9kt wants to merge 2 commits into
cilium:mainfrom
s9kt:fix/batch-lookup-cap-bpf
Open

fix(map): defer haveBatchAPI check in BatchLookupCmd until syscall fails#2017
s9kt wants to merge 2 commits into
cilium:mainfrom
s9kt:fix/batch-lookup-cap-bpf

Conversation

@s9kt
Copy link
Copy Markdown

@s9kt s9kt commented May 26, 2026

fix(map): defer haveBatchAPI() check in BatchLookupCmd() until syscall fails

BatchLookup() called haveBatchAPI() indiscriminately, which creates a temporary BPF map implying support for CAP_BPF. BatchDelete() and BatchUpdate() were fixed in #1071 to only check for the batch API after a syscall failure, same pattern applied here.

Fixes #2013

Signed-off-by: Pranav Singhal <108766159+s9kt@users.noreply.github.com>
@s9kt s9kt requested a review from a team as a code owner May 26, 2026 04:50
Signed-off-by: Pranav Singhal <108766159+s9kt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve haveBatchAPI() feature probing in BatchLookup()

1 participant