microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.25k stars 812 forks source link

`wsl2.hostAddressLoopback` refers only `experimental.networkinMode`, not `wsl2.networkingMode` #11102

Open euxn23 opened 7 months ago

euxn23 commented 7 months ago

Windows Version

Microsoft Windows [Version 10.0.22635.3130]

WSL Version

2.1.1.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.146.1-2

Distro Version

Arch Linux

Other Software

No response

Repro Steps

  1. According to the Document(https://learn.microsoft.com/en-us/windows/wsl/wsl-config#main-wsl-settings), to use hostAddressLoopback option, write /Users/{user}/.wslconfig as below.
    [wsl2]
    networkingMode=true
    hostAddressLoopback=true
  2. Then hostAddressLoopback does not work.

But it works when wrote as below.

[experimental]
networkingMode=true
hostAddressLoopback=true

I think hostAddressLoopback refers only experimental.networkinMode, not wsl2.networkingMode.

Expected Behavior

hostAddressLoopback works.

Actual Behavior

hostAddressLoopback does not work.

Diagnostic Logs

No response

github-actions[bot] commented 7 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

zcobol commented 7 months ago

@euxn23 if you look at release 2.0.5 notes (https://github.com/microsoft/WSL/releases/tag/2.0.5) only networkingMode was promoted. hostAddressLoopback is still experimental. Try:

[wsl2]
networkingMode=true

[experimental]
hostAddressLoopback=true
benhillis commented 7 months ago

Yeah looks like our docs are incorrect, I'll get that fixed.

XDongiang commented 3 months ago

Yeah looks like our docs are incorrect, I'll get that fixed.

"I still have this issue, only when [experimental] networkingMode=mirrored hostAddressLoopback=true it works."

xanatorium commented 14 hours ago

Crrent state of affairs is that the following works.

[wsl2] networkingMode=mirrored

[experimental] hostAddressLoopback=true