VirtualBox

Changeset 53082 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Oct 17, 2014 6:49:23 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96599
Message:

NetFlt/win: NDIS6: no halt on host suspend, hardware id changed to match the old NDIS5 id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r53080 r53082  
    51785178                CoTaskMemFree(pswzBindName);
    51795179
    5180                 wchar_t * pswzHwId;
    5181                 hrc = pAdaptorComponent->GetId(&pswzHwId);
     5180                /* Assume we should use the old NDIS5.1 version of driver which uses TRUNKTYPE_NETADP */
     5181                trunkType = TRUNKTYPE_NETADP;
     5182
     5183                HKEY hkParams;
     5184                hrc = pAdaptorComponent->OpenParamKey(&hkParams);
    51825185                Assert(hrc == S_OK);
    51835186                if (hrc == S_OK)
    51845187                {
    5185                     if (!_wcsnicmp(pswzHwId, L"sun_VBoxNetAdp6", sizeof(L"sun_VBoxNetAdp6")/2))
     5188                    WCHAR swzInfSection[16];
     5189                    DWORD dwSize = sizeof(swzInfSection);
     5190                    hrc = RegQueryValueExW(hkParams, L"InfSection", NULL, NULL, (LPBYTE)swzInfSection, &dwSize);
     5191                    if (hrc == S_OK)
    51865192                    {
    5187                         /*
    5188                          * This is NDIS 6.x miniport, it relies on NetLwf filter to
    5189                          * run actual traffic. We use netflt attachment instead of
    5190                          * netadp, which is used in case of NDIS 5.x.
    5191                          */
    5192                         InsertConfigInteger(pCfg, "TrunkType", kIntNetTrunkType_NetFlt);
    5193                         trunkType = TRUNKTYPE_NETFLT;
     5193                        if (!_wcsnicmp(swzInfSection, L"VBoxNetAdp6.ndi", sizeof(L"VBoxNetAdp6.ndi")/2))
     5194                        {
     5195                            /*
     5196                             * This is NDIS 6.x miniport, it relies on NetLwf filter to
     5197                             * run actual traffic. We use netflt attachment instead of
     5198                             * netadp, which is used in case of NDIS 5.x.
     5199                             */
     5200                            trunkType = TRUNKTYPE_NETFLT;
     5201                        }
    51945202                    }
    5195                     else
    5196                     {
    5197                         InsertConfigInteger(pCfg, "TrunkType", kIntNetTrunkType_NetAdp);
    5198                         trunkType = TRUNKTYPE_NETADP;
    5199                     }
     5203                    RegCloseKey(hkParams);
    52005204                }
    52015205                else
     
    52035207                    LogRel(("Console::i_configNetwork: INetCfgComponent::GetId(%s) failed, err (0x%x), "
    52045208                            "falling back to NDIS5 attachment\n", pszTrunkName, hrc));
    5205                     InsertConfigInteger(pCfg, "TrunkType", kIntNetTrunkType_NetAdp);
    5206                     trunkType = TRUNKTYPE_NETADP;
    5207                 }
    5208                 CoTaskMemFree(pswzHwId);
     5209                    /* Nothing to do here as the trunk type defaults to NETADP */
     5210                }
     5211                InsertConfigInteger(pCfg, "TrunkType", trunkType == TRUNKTYPE_NETFLT ? kIntNetTrunkType_NetFlt : kIntNetTrunkType_NetAdp);
    52095212
    52105213                pAdaptorComponent.setNull();
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette