Description
Hi,
the NetworkInterface.GetAllNetworkInterfaces() has a different behaviour in .net 9 & .net 10 compared to earlier .net versions (.net 8 and lower).
It will return a lot of adapters that are not listed in ipconfig, ncpa.cpl or Get-NetAdapter, it looks like this are properties that can be configured of the real adapters. It also not possible to filter out the adpaters because they are from the type ethernet or wireless.
Reproduction Steps
using System.Net.NetworkInformation;
Console.WriteLine(".NET Version: " + Environment.Version+ "\n");
Console.WriteLine("NetworkInterface.GetAllNetworkInterfaces()\n\n");
foreach (var adapter in NetworkInterface.GetAllNetworkInterfaces())
{
Console.WriteLine($"Name: {adapter.Name}");
}
Compiled for .net 8 / 9 / 10
Expected behavior
Output should be the same as 8 and before. I don't think this are real adapters? At least they are not listed anywhere in the other tools....
Actual behavior
See screenshot above
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
Maybe related to this: #89990 ?