microsoft / microsoft/ebpf-for-windows

Networking related eBPF tests that need TCP/UDP flows should check for IPv4 availability.

Open
#2,417 1 comment 0 reactions 0 assignees View on GitHub
bug cleanup help wanted triaged
Dominant language
C
Stars
3.6k
Forks
311
Avg merge
6d 10h
Merged PRs (30d)
21

Description

### Describe the bug

eBPF test code that needs TCP/UDP endpoints/flows should _first_ check for IPv4 availability before usage.

Windows supports 'IPv6 only' configurations and in such scenarios, even the IPv4 `loopback` interface (`127.0.0.1`) is _NOT_ available. On the flip side though, 'IPv4 Only' configurations are _NOT_ supported, notwithstanding the multitude of supposed 'workarounds' available on the web.

Therefore, tests that require TCP/UDP endpoints should either:
- default to using IPv6, if they are address family agnostic.
_OR_
- Perform a run-time check for IPv4 availability prior to usage if IPv4 endpoints/flows are a test requirement. Such tests should be skipped on an 'IPv6 only' configuration to avoid false negatives (especially during automated testing) due to IPv4 endpoint/flow setup failures on such configurations.

Also, eBPF testing documentation should be updated to explicitly call this out as a 'best practice'.

Going forward, it would be a worthwhile to ensure that:
- All _new_ eBPF tests that can work with address family agnostic TCP/UDP endpoint/flows, use IPv6.
- IPv4 specific tests test for IPv4 availability at run time and skip the test completely in 'IPv6 only' configurations.

### OS information

_No response_

### Steps taken to reproduce bug

N/A

### Expected behavior

N/A

### Actual outcome

N/A

### Additional details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating eBPF tests that create TCP or UDP endpoints and flows, then separate address-family-agnostic cases from IPv4-specific ones. Check how the test suite can detect IPv4 availability and skip unsupported cases, and review the eBPF testing documentation. Done means IPv6 is used where possible, IPv4-dependent tests skip on IPv6-only systems, and the best practice is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
documentation, networking, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.