Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 1, 2026

Changes proposed in this pull request

  • Filter network interfaces by checking both Name and Description properties against pattern list
  • Add patterns for WAN Miniport and Microsoft Wi-Fi Direct Virtual Adapter to filter list

Related issue(s)

Copilot generated summary

Copilot summary

.NET 9/10 changed NetworkInterface.GetAllNetworkInterfaces() to expose virtual/filter adapters. These appear in two forms:

  1. Suffixed in Name: "vEthernet (Default Switch)-WFP Native MAC Layer LightWeight Filter-0000"
  2. In Description field: Name="LAN-Verbindung* 1", Description="WAN Miniport (SSTP)"

Previous implementation only checked Name, missing adapters where patterns appear in Description.

Fix: Check both properties

// Before: only Name
if (NetworkInterfaceFilteredPatterns.Any(pattern => networkInterface.Name.Contains(pattern)))
    continue;

// After: Name OR Description  
if (NetworkInterfaceFilteredPatterns.Any(pattern => 
    networkInterface.Name.Contains(pattern) || 
    networkInterface.Description.Contains(pattern)))
    continue;

Filter patterns (applied to both fields):

  • Hyper-V Virtual Switch Extension Filter
  • Hyper-V Virtual Switch Extension Adapter
  • WFP Native/802.3 MAC Layer LightWeight Filter
  • Npcap Packet Driver (NPCAP)
  • QoS Packet Scheduler
  • Ethernet (Kerneldebugger)
  • Filter Driver
  • WAN Miniport
  • Microsoft Wi-Fi Direct Virtual Adapter

Impact: Filters all virtual/filter adapters regardless of whether pattern appears in Name or Description. Preserves legitimate interfaces (Ethernet, WLAN, Bluetooth).

Ref: dotnet/runtime#122751

To-Do

Contributing

By submitting this pull request, I confirm the following:

Original prompt

This section details on the original issue you should resolve

<issue_title>NetworkInterfaces - .net10 shows strange adapters.</issue_title>
<issue_description>Since .net 9 / 10 the network interfaces shows a lot of adapters:

Image

Possible workaround?

  • Blacklist of adapter names?

Reported to dotnet/runtime dotnet/runtime#122751</issue_description>

<agent_instructions>Try to figure out if there is an elegant way filter out this new behaviour microsoft has introduced in .net9/10 to show more network interfaces. If not possible, implement a blacklist. Search in the dotnet issue that is linked what has changed.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 1, 2026 02:25
Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix strange adapters shown in NetworkInterfaces for .net10 Filter virtual/filter adapters in .NET 9/10 Feb 1, 2026
Copilot AI requested a review from BornToBeRoot February 1, 2026 02:32
@BornToBeRoot
Copy link
Owner

@copilot what is with the WAN Miniport / Microsoft Wi-Fi Direct Virtual Adapter , i see this in the description of some "LAN Connections"

Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 1, 2026

@copilot what is with the WAN Miniport / Microsoft Wi-Fi Direct Virtual Adapter , i see this in the description of some "LAN Connections"

Added "WAN Miniport" and "Microsoft Wi-Fi Direct Virtual Adapter" to the filter list in commit ac3ac82. These virtual adapters (used for VPN/PPP connections and Wi-Fi Direct peer-to-peer) will now be filtered out along with the other virtual/filter adapters. Testing confirms all WAN Miniport variants (SSTP, IKEv2, L2TP, PPTP, IP, IPv6) and Wi-Fi Direct adapters are now filtered while legitimate network interfaces remain visible.

Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Copilot AI changed the title Filter virtual/filter adapters in .NET 9/10 Filter virtual/filter network adapters by Name and Description in .NET 9/10 Feb 1, 2026
@BornToBeRoot BornToBeRoot marked this pull request as ready for review February 1, 2026 02:54
@BornToBeRoot BornToBeRoot added 🐛 bug dependencies Pull requests that update a dependency file labels Feb 1, 2026
@BornToBeRoot BornToBeRoot added this to the next-release milestone Feb 1, 2026
@BornToBeRoot BornToBeRoot added ✅ LGTM ✔️ dependencies and removed dependencies Pull requests that update a dependency file labels Feb 1, 2026
@mergify mergify bot merged commit 5237ea1 into main Feb 1, 2026
4 checks passed
@mergify mergify bot deleted the copilot/fix-network-adapter-issues branch February 1, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants