microsoft / microsoft/ebpf-for-windows
Add tests which validate the 'bpf_sock_addr_set_redirect_context' helper function for connected UDP sockets for cgroup/sock_addr_connect
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 311
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 21
Description
### Describe the feature you'd like supported
Our existing tests do not utilize the 'bpf_sock_addr_set_redirect_context' helper function for connected UDP sockets. This should be updated to address the test gap.
### Proposed solution
The cgroup_sock_addr2.c test program currently skips invoking bpf_sock_addr_set_redirect_context for connected udp sockets. This should be updated to invoke it unconditionally. Note that it should do so for any protocol AND verdict decision (currently, it only uses it for redirected connections).
### Additional context
This change is currently blocked. On an initial attempt to add these tests, a driver verifier break would trigger after netebpfext.sys unloads. After initial debugging, it looks like the issue is outside the eBPF platform.
Contributor guide
Research direction
Start with cgroup_sock_addr2.c and inspect the connected UDP socket test paths. Update the tests to invoke bpf_sock_addr_set_redirect_context for every protocol and verdict decision, then run the relevant cgroup/sock_addr_connect tests. Account for the reported driver verifier failure after netebpfext.sys unloads, which is currently blocking this work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100