Skip to content

fix(windows): make GetIpNetEntry2 optional - #186

Merged
shellrow merged 1 commit into
shellrow:mainfrom
Arqu:fix/windows-getipnetentry2-optional
Aug 26, 2026
Merged

fix(windows): make GetIpNetEntry2 optional#186
shellrow merged 1 commit into
shellrow:mainfrom
Arqu:fix/windows-getipnetentry2-optional

Conversation

@Arqu

@Arqu Arqu commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

We had CI fail recently which I traced to a bump to netdev from 0.45 to 0.46.
Ref https://github.com/n0-computer/iroh/actions/runs/32749963007/job/97507327668?pr=4487

Seems like it's a well known issue in the Wine circles and GetIpNetEntry2 is stubbed out making the process fail.
Apparently there's work to get it supported in the bleeding edge of Wine/Proton, but this should make it safe for older setup to work too.

I kept the change as minimal as possible.

Here's a quick matrix after testing on our CI instance after this patch

Built from this branch for x86_64-pc-windows-gnu, run under Wine 11.0 on Linux
(Ubuntu 22.04, fresh WINEPREFIX). Baseline = main (v0.46.1), unmodified.

# Binary Baseline This PR
1 examples/default_gateway ❌ exit 1 ✅ exit 0
2 examples/list_interfaces ❌ exit 1 ✅ exit 0
3 cargo test --lib (20 tests) ✅ 20 passed, 0 failed

Before:

wine: Call from ... to unimplemented function iphlpapi.dll.GetIpNetEntry2, aborting
Unhandled exception: unimplemented function iphlpapi.dll.GetIpNetEntry2 called in 64-bit code

After: default_gateway completes with:

Default Gateway
        MAC Address: 00:00:00:00:00:00
        IPv4: [<redacted>]
        IPv6: [fe80::1]

@shellrow

Copy link
Copy Markdown
Owner

Thanks for the fix and the detailed testing!
This looks great.

@shellrow
shellrow merged commit 91fb7b1 into shellrow:main Aug 26, 2026
10 checks passed
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.

2 participants