Skip to content

VirtioProxy: rely on wsldevicehost default MAC addresses and fix DNS tunneling assert#40430

Merged
benhillis merged 3 commits into
masterfrom
user/benhill/virtio_proxy_mac
May 7, 2026
Merged

VirtioProxy: rely on wsldevicehost default MAC addresses and fix DNS tunneling assert#40430
benhillis merged 3 commits into
masterfrom
user/benhill/virtio_proxy_mac

Conversation

@benhillis
Copy link
Copy Markdown
Member

Summary of the Pull Request

Setting MAC addresses through the virtio-proxy guest connection options has proven problematic, so stop forwarding client_mac, gateway_mac, and gateway_mac_ipv6 from VirtioNetworking::RefreshGuestConnection() and let wsldevicehost fall back to its default values.

Also extend the WI_ASSERT in WslCoreVm::IsDnsTunnelingSupported() to accept NetworkingMode::VirtioProxy. The VirtioProxy case was missed when the wslc feature branch was merged into main, causing the assert to fire in debug builds when DNS tunneling support is queried under that mode.

PR Checklist

  • Closes: N/A
  • Communication: I've discussed this with core contributors already.
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: No user-facing docs changes.

Detailed Description of the Pull Request / Additional comments

  • src/windows/common/VirtioNetworking.cpp: Drop the client_mac, gateway_mac, and gateway_mac_ipv6 options from the virtio-proxy guest connection refresh so wsldevicehost uses its default MAC values instead of the ones we were attempting to push.
  • src/windows/service/exe/WslCoreVm.cpp: Add NetworkingMode::VirtioProxy to the assert in IsDnsTunnelingSupported() that was missed during the merge of the wslc feature branch to main.

Validation Steps Performed

Manual testing under VirtioProxy networking mode confirms wsldevicehost picks up its default MAC addresses and the debug assert no longer fires when DNS tunneling support is queried.

…tunneling assert

Setting MAC addresses through the virtio-proxy guest connection options has
proven problematic, so stop forwarding client_mac, gateway_mac, and
gateway_mac_ipv6 from VirtioNetworking::RefreshGuestConnection() and let
wsldevicehost fall back to its default values.

Also extend the WI_ASSERT in WslCoreVm::IsDnsTunnelingSupported() to accept
NetworkingMode::VirtioProxy. The VirtioProxy case was missed when the wslc
feature branch was merged into main, causing the assert to fire in debug
builds when DNS tunneling support is queried under that mode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@benhillis benhillis requested a review from a team as a code owner May 5, 2026 22:17
Copilot AI review requested due to automatic review settings May 5, 2026 22:17
The previous commit dropped the only callers of GetBestGatewayMacAddress
when virtio-proxy stopped pushing MAC addresses to wsldevicehost. Remove
the now-unused declaration and definition.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts WSL's VirtioProxy networking path so the guest-device host supplies its own default MAC addresses, and fixes a debug-only DNS-tunneling assertion that was still treating VirtioProxy as unsupported. It fits into the Windows-side networking configuration/runtime path for WSL VMs.

Changes:

  • Removed client_mac, gateway_mac, and gateway_mac_ipv6 from VirtioNetworking::RefreshGuestConnection().
  • Updated WslCoreVm::IsDnsTunnelingSupported() to allow NetworkingMode::VirtioProxy.
  • Kept the rest of the VirtioProxy IP/DNS refresh flow unchanged.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/windows/common/VirtioNetworking.cpp Stops sending MAC-related guest connection options so wsldevicehost defaults are used.
src/windows/service/exe/WslCoreVm.cpp Expands the DNS-tunneling debug assert to include VirtioProxy mode.

Comment thread src/windows/common/VirtioNetworking.cpp
Comment thread src/windows/service/exe/WslCoreVm.cpp
@sirredbeard
Copy link
Copy Markdown
Collaborator

Built from this branch. Installed. Confirmed wslc was version built from here.

Saw a single initial transient 'catastrophic error' when trying wslc container run --rm -it ... while Cloudflare WARP VPN enabled, shutdown WSL (maybe previous version was still in memory?), re-tried with pulling various images, now no errors when pulling and running various images while actively turning Cloudflare WARP VPN off and on again.

Passing logs WslLogs-2026-05-06_13-20-12.tar.gz

@benhillis benhillis merged commit 6327f5a into master May 7, 2026
11 checks passed
@benhillis benhillis deleted the user/benhill/virtio_proxy_mac branch May 7, 2026 03:31
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.

4 participants