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

Link for EBPF_ATTACH_TYPE_BIND has type BPF_LINK_TYPE_UNSPEC instead of BPF_LINK_TYPE_PLAIN #4096

Open
lmb opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lmb
Copy link
Collaborator

lmb commented Dec 17, 2024

Describe the bug

Checking struct bpf_link_info.type for a link backed by a EBPF_ATTACH_TYPE_BIND program shows that the value is BPF_LINK_TYPE_UNSPEC (0) instead of BPF_LINK_TYPE_PLAIN. I'd expect the latter to be the correct value due to the way the hook is initialised:

ebpf_attach_provider_data_t _net_ebpf_bind_hook_provider_data = {
EBPF_ATTACH_PROVIDER_DATA_HEADER, EBPF_PROGRAM_TYPE_BIND_GUID, BPF_ATTACH_TYPE_BIND, BPF_LINK_TYPE_PLAIN};

OS information

No response

Steps taken to reproduce bug

See #4097

Expected behavior

bpf_link_info.type should be BPF_LINK_TYPE_PLAIN for BPF_PROG_TYPE_BIND

Actual outcome

The value is 0.

Additional details

No response

@lmb lmb added the bug Something isn't working label Dec 17, 2024
lmb added a commit to isovalent/ebpf-for-windows that referenced this issue Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant