WSL Settings: network mode is not synchronized after mirrored-to-NAT fallback

Open
#41,976 6 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp, linux
Domain
networking

Research direction

Start by tracing where WSL selects mirrored or NAT networking when IPv6 is disabled, then follow how that selected mode reaches the WSL Settings app and .wslconfig. The issue gives no source files or tests, so first locate those entry points and any existing fallback tests. Done means the unavailable mirrored mode is reported clearly or both configuration views reflect the actual NAT mode.

Written by the indexing model from the issue text.

Description

feature wsl2
Windows Version

Microsoft Windows [版本 10.0.26100.4946]

WSL Version

2.7.10.0

Are you using WSL 1, WSL 2, or WSLC?
  • WSL 2
  • WSL 1
  • WSLC
Kernel Version

6.18.33.2-2

Distro Version

Ubuntu-22.04 (默认值)

Other Software

No response

Repro Steps

Set the WSL networking mode to mirrored in .wslconfig and/or the WSL Settings app.

Disable IPv6 on Windows (for example, set DisabledComponents=0xff under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters).

Restart WSL.

Observe the actual WSL networking mode and check the corresponding configuration in the WSL Settings app and .wslconfig.

Expected Behavior

When mirrored mode cannot be used because IPv6 is disabled, WSL should either clearly report that mirrored mode is unavailable or fall back to NAT mode while keeping the WSL Settings app and .wslconfig synchronized with the actual networking mode in use.

Actual Behavior

Actual Behavior
When the networking mode is set to mirrored and IPv6 is disabled, WSL silently falls back to NAT mode. However, the configuration in the WSL Settings app and .wslconfig is not synchronized or updated, so they still show mirrored instead of reflecting the actual NAT mode.

Diagnostic Logs

No response

Dominant language
C++
Stars
34.4k
Forks
1.9k
Avg merge
1d 23h
Merged PRs (30d)
166

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/WSL

All issues in microsoft/WSL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.