Skip to content

Query Windows TAP health directly by interface LUID - #2629

Open
Faulo wants to merge 2 commits into
zerotier:devfrom
Faulo:fix/windows-tap-health
Open

Faulo wants to merge 2 commits into
zerotier:devfrom
Faulo:fix/windows-tap-health

Conversation

@Faulo

@Faulo Faulo commented Oct 17, 2026

Copy link
Copy Markdown

Fixes #2626.

Depends on #2628. This stacked PR currently includes the prerequisite commit; the unique change is 4238024455f23866190d188ff6b97d38b0334280.

Problem

The Windows TAP health check scans GetAdaptersAddresses using a fixed 16 KiB buffer. HNS can omit the raw TAP from that IP-adapter enumeration after moving IP protocol ownership to a management vNIC. The current loop then leaves isBorked false and treats the omitted TAP as healthy. Enumeration errors, including buffer overflow, have the same effect.

Change

  • Query GetIfEntry2 directly with the TAP LUID already held by WindowsEthernetTap.
  • Classify a successful IfOperStatusUp query as healthy and other successful operational states as unhealthy.
  • Classify API failures as unknown so a transient query failure does not cause a reset loop.
  • Extend the focused TAP-state regression for every Windows operational state and representative API failures.

Validation

  • Windows x64 Debug with VS 2022 Build Tools 17.14 / MSVC 14.44 and Ninja.
  • windows-tap-device-state: passed.
  • A native diagnostic confirmed that HNS omitted the raw TAP from GetAdaptersAddresses while GetIfEntry2 continued to return its state by LUID.

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.

Windows TAP health check treats an omitted adapter as healthy

1 participant