- Timestamp:
- Jul 25, 2017 3:58:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp
r66719 r68112 1010 1010 #endif /* VBOXNETLWF_FIXED_SIZE_POOLS */ 1011 1011 1012 DECLARE_GLOBAL_CONST_UNICODE_STRING(g_strHostOnlyMiniportName, L"VirtualBox Host-Only"); 1013 1012 1014 static NDIS_STATUS vboxNetLwfWinAttach(IN NDIS_HANDLE hFilter, IN NDIS_HANDLE hDriverCtx, 1013 1015 IN PNDIS_FILTER_ATTACH_PARAMETERS pParameters) … … 1019 1021 { 1020 1022 vboxNetLwfLogErrorEvent(IO_ERR_INTERNAL_ERROR, NDIS_STATUS_FAILURE, 1); 1023 return NDIS_STATUS_FAILURE; 1024 } 1025 1026 /* 1027 * We need a copy of NDIS_STRING structure as we are going to modify length 1028 * of the base miniport instance name since RTL does not support comparing 1029 * first n characters of two strings. We check if miniport names start with 1030 * "Virtual Host-Only" to detect host-only adapters. It is a waste of resources 1031 * to bind our filter to host-only adapters since they now operate independently. 1032 */ 1033 NDIS_STRING strTruncatedInstanceName = *pParameters->BaseMiniportInstanceName; /* Do not copy data, only the structure itself */ 1034 strTruncatedInstanceName.Length = g_strHostOnlyMiniportName.Length; /* Truncate instance name */ 1035 if (RtlEqualUnicodeString(&strTruncatedInstanceName, &g_strHostOnlyMiniportName, TRUE /* Case insensitive */)) 1036 { 1037 DbgPrint("vboxNetLwfWinAttach: won't attach to %wZ\n", pParameters->BaseMiniportInstanceName); 1021 1038 return NDIS_STATUS_FAILURE; 1022 1039 }
Note:
See TracChangeset
for help on using the changeset viewer.