VirtualBox

Changeset 55207 in vbox


Ignore:
Timestamp:
Apr 13, 2015 12:45:00 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99513
Message:

NDIS6/NetLwf: "No bypass" option enabled by default (#7231)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/ndis6/VBoxNetLwf-win.cpp

    r55041 r55207  
    1717
    1818//#define VBOXNETLWF_SYNC_SEND
     19#define VBOXNETLWF_NO_BYPASS
    1920
    2021#include <VBox/version.h>
     
    14181419    LogFlow(("==>"__FUNCTION__": module=%p\n", hModuleCtx));
    14191420    PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)hModuleCtx;
     1421#ifdef VBOXNETLWF_NO_BYPASS
     1422    if (!ASMAtomicReadBool(&pModule->fActive))
     1423    {
     1424        /*
     1425         * The trunk is inactive, jusp pass along all packets to the next
     1426         * underlying driver.
     1427         */
     1428        NdisFSendNetBufferLists(pModule->hFilter, pBufLists, nPort, fFlags);
     1429        return;
     1430    }
     1431#endif
    14201432    if (vboxNetLwfWinIsRunning(pModule))
    14211433    {
     
    15421554    LogFlow(("==>"__FUNCTION__": module=%p\n", hModuleCtx));
    15431555    PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)hModuleCtx;
     1556#ifdef VBOXNETLWF_NO_BYPASS
     1557    if (!ASMAtomicReadBool(&pModule->fActive))
     1558    {
     1559        /*
     1560         * The trunk is inactive, jusp pass along all packets to the next
     1561         * overlying driver.
     1562         */
     1563        NdisFIndicateReceiveNetBufferLists(pModule->hFilter, pBufLists, nPort, nBufLists, fFlags);
     1564        return;
     1565    }
     1566#endif
    15441567    if (vboxNetLwfWinIsRunning(pModule))
    15451568    {
     
    16991722    PChars.Header.Revision = NDIS_FILTER_PARTIAL_CHARACTERISTICS_REVISION_1;
    17001723
     1724#ifndef VBOXNETLWF_NO_BYPASS
    17011725    if (ASMAtomicReadBool(&pModuleCtx->fActive))
     1726#endif
    17021727    {
    17031728        Log((__FUNCTION__": active mode\n"));
     
    17071732        PChars.ReturnNetBufferListsHandler = vboxNetLwfWinReturnNetBufferLists;
    17081733    }
     1734#ifndef VBOXNETLWF_NO_BYPASS
    17091735    else
    17101736    {
    17111737        Log((__FUNCTION__": bypass mode\n"));
    17121738    }
     1739#endif
    17131740    NDIS_STATUS Status = NdisSetOptionalHandlers(pModuleCtx->hFilter,
    17141741                                                 (PNDIS_DRIVER_OPTIONAL_HANDLERS)&PChars);
Note: See TracChangeset for help on using the changeset viewer.

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