You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(this issue was originally logged on the WSL2 repo and was verified not to be a WSL2 issue).
Environment
Windows build number: Microsoft Windows [Version 10.0.19041.172]
Your Distribution version: Release: 18.04
Whether the issue is on WSL 2 and/or WSL 1: Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1-Microsoft Fri Dec 06 14:06:00 PST 2019
Steps to reproduce
Minimal .Net Core project to demonstrate the problem:
using System;using System.Net;namespaceGetLocalIPAddresses{classProgram{staticvoidMain(string[]args){
Console.WriteLine("Get Local IP Addresses Test:");varaddresses= Dns.GetHostAddresses(string.Empty);
Console.WriteLine($"Address count {addresses?.Length}.");foreach(var address in addresses){
Console.WriteLine(address);}}}}
Expected behavior
Based on documentation here a call to System.Net.DNS.GetHostAddresses with an empty string should return a list of all the local IP addresses.
Windows 10 cmd shell result
>dotnet run --framework netcoreapp3.1
Get Local IP Addresses Test:
Address count 6.
fe80::54a9:d238:b2ee:ceb%21
fe80::3c8d:dbf7:1710:efb4%64
fe80::64dc:7955:ef80:6bc4%33
192.168.11.50
172.29.0.1
172.31.32.1
Ubuntu 18.04.4 LTS vm result
$ dotnet run --framework netcoreapp3.1
Get Local IP Addresses Test:
Address count 2.
192.168.11.41
fe80::20c:29ff:fee7:4ce4
Yes I can confirm the issue is fixed in net5.0 preview.
dotnet run --framework net5.0
Get Local IP Addresses Test:
Address count 7.
127.0.1.1
192.168.11.50
fe80::54a9:d238:b2ee:ceb%21
172.31.32.1
fe80::64dc:7955:ef80:6bc4%33
172.29.0.1
fe80::3c8d:dbf7:1710:efb4%64
(this issue was originally logged on the WSL2 repo and was verified not to be a WSL2 issue).
Environment
Steps to reproduce
Minimal .Net Core project to demonstrate the problem:
Expected behavior
Based on documentation here a call to
System.Net.DNS.GetHostAddresses
with an empty string should return a list of all the local IP addresses.Windows 10 cmd shell result
Ubuntu 18.04.4 LTS vm result
Actual behavior
wsl2 result
The text was updated successfully, but these errors were encountered: