Skip to content

Commit b4f0ded

Browse files
CopilotBornToBeRoot
andcommitted
Filter network interfaces by both Name and Description
Co-authored-by: BornToBeRoot <[email protected]>
1 parent ac3ac82 commit b4f0ded

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Source/NETworkManager.Models/Network/NetworkInterface.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ public static List<NetworkInterfaceInfo> GetNetworkInterfaces()
8181
continue;
8282

8383
// Filter out virtual/filter adapters introduced in .NET 9/10
84-
// Check if the adapter name contains any filtered pattern
84+
// Check if the adapter name or description contains any filtered pattern
8585
// See: https://github.com/dotnet/runtime/issues/122751
86-
if (NetworkInterfaceFilteredPatterns.Any(pattern => networkInterface.Name.Contains(pattern)))
86+
if (NetworkInterfaceFilteredPatterns.Any(pattern =>
87+
networkInterface.Name.Contains(pattern) ||
88+
networkInterface.Description.Contains(pattern)))
8789
continue;
8890

8991
var listIPv4Address = new List<Tuple<IPAddress, IPAddress>>();

0 commit comments

Comments
 (0)