Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

fix: eBPF attribute should be false when there are no programs#192

Merged
aojea merged 1 commit into
google:mainfrom
gauravkghildiyal:fix-ebpf-attr
Aug 15, 2025
Merged

fix: eBPF attribute should be false when there are no programs#192
aojea merged 1 commit into
google:mainfrom
gauravkghildiyal:fix-ebpf-attr

Conversation

@gauravkghildiyal
Copy link
Copy Markdown
Member

Currently, eBPF attribute is always set to true since link.QueryPrograms always returns as success. This leads to the program thinking that is has "some" BPF programs since the code does not check for an empty return value.

This eventually trickles down to failures in "validate bpf filter attributes". The attribute is always true so we never wait and continue checking for the existence of tcFilterNames which may not yet have been updated by the driver.

Fixes #136

Currently, eBPF attribute is always set to true since `link.QueryPrograms`
mostly returns a successful call. This leads to the program thinking that is has
"some" BPF programs since the code does not check for an empty value.

This eventually trickles down to failures in "validate bpf filter attributes".
The attribute is always true so we never wait and continue checking for the
existence of `tcFilterNames` which may not yet have been updated by the driver.
Copy link
Copy Markdown
Contributor

@aojea aojea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, this library is great but as everything ebpf related it's still relatively new and there are no good examples or docs outside of cilium codebase that explains well the semantics

@aojea aojea merged commit 490c209 into google:main Aug 15, 2025
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate test flakes in "validate bpf filter attributes" e2e test

2 participants