VirtioProxy: rely on wsldevicehost default MAC addresses and fix DNS tunneling assert#40430
Conversation
…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>
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>
There was a problem hiding this comment.
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, andgateway_mac_ipv6fromVirtioNetworking::RefreshGuestConnection(). - Updated
WslCoreVm::IsDnsTunnelingSupported()to allowNetworkingMode::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. |
|
Built from this branch. Installed. Confirmed Saw a single initial transient 'catastrophic error' when trying Passing logs WslLogs-2026-05-06_13-20-12.tar.gz |
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, andgateway_mac_ipv6fromVirtioNetworking::RefreshGuestConnection()and let wsldevicehost fall back to its default values.Also extend the
WI_ASSERTinWslCoreVm::IsDnsTunnelingSupported()to acceptNetworkingMode::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
Detailed Description of the Pull Request / Additional comments
src/windows/common/VirtioNetworking.cpp: Drop theclient_mac,gateway_mac, andgateway_mac_ipv6options 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: AddNetworkingMode::VirtioProxyto the assert inIsDnsTunnelingSupported()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.