VirtualBox

Changeset 22599 in vbox


Ignore:
Timestamp:
Aug 31, 2009 12:10:12 PM (15 years ago)
Author:
vboxsync
Message:

netflt-adp/win: additional bugfix

Location:
trunk/src/VBox/HostDrivers/VBoxNetFlt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h

    r22441 r22599  
    195195            /** Filter driver device context. */
    196196            ADAPT IfAdaptor;
    197             /** since the driver is able to work in different modes (NetFlt or PassThru)
    198              * we need to wait for the old-mode operations to complete before switching to the new mode
    199              * The most trickiest here is NetFlt->PassThru switch as we can not block in PtSent/Receive
    200              * because they typically run at DPC level
    201              * we also not allowed to re-order packets, so on NetFlt-PassThru switch (kVBoxNetDevMode_NetFltDeinitializing mode)
    202              * we put them to the pending queue to process them in order on final mode activation stage */
    203             volatile VBOXNETDEVMODE_TYPE enmModeMP;
    204             volatile VBOXNETDEVMODE_TYPE enmModePT;
     197
    205198            volatile uint32_t cModeNetFltRefs;
    206199            volatile uint32_t cModePassThruRefs;
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h

    r22441 r22599  
    232232    pList->pTail->Next = pEntry;
    233233    pList->pTail = pEntry;
     234    pEntry->Next = NULL;
    234235}
    235236
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h

    r22441 r22599  
    297297/*    NDIS_HANDLE                    hHandle; */
    298298} ADAPT_DEVICE, *PADAPT_DEVICE;
    299 
    300 
    301 typedef enum VBOXNETDEVMODE_TYPE
    302 {
    303     kVBoxNetDevMode_InvalidValue = 0,
    304     kVBoxNetDevMode_NetFltInitializing,
    305     kVBoxNetDevMode_NetFltInitialized,
    306     kVBoxNetDevMode_NetFltDeinitializing,
    307     kVBoxNetDevMode_NetFltWaitDeinitialized,
    308     kVBoxNetDevMode_NetFltDeinitialized,
    309 
    310 } VBOXNETDEVMODE_TYPE;
    311299
    312300/* packet filter processing mode constants */
     
    481469} TRANSFERDATA_RSVD, *PTRANSFERDATA_RSVD;
    482470
    483 typedef struct _PT_RSVD
    484 {
    485     union
    486     {
    487         SEND_RSVD SendRsvd;
    488         TRANSFERDATA_RSVD TransferDataRsvd;
    489     };
    490 } PT_RSVD, *PPT_RSVD;
    491 
    492 
    493 #ifndef VBOX_NETFLT_ONDEMAND_BIND
    494471/** Miniport reserved part of a received packet that is allocated by
    495472 * us. Note that this should fit into the MiniportReserved space
     
    505482} RECV_RSVD, *PRECV_RSVD;
    506483
     484typedef struct _PT_RSVD
     485{
     486    union
     487    {
     488        RECV_RSVD RecvRsvd;
     489        TRANSFERDATA_RSVD TransferDataRsvd;
     490    } u;
     491} PT_RSVD, *PPT_RSVD;
     492
     493
     494#ifndef VBOX_NETFLT_ONDEMAND_BIND
     495
    507496C_ASSERT(sizeof(RECV_RSVD) <= sizeof(((PNDIS_PACKET)0)->MiniportReserved));
    508497#endif
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c

    r22441 r22599  
    799799static bool vboxNetFltWinRemovePacketFromList(PINTERLOCKED_SINGLE_LIST pList, PNDIS_PACKET pPacket)
    800800{
    801     PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->TransferDataRsvd;
     801    PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd;
    802802    return vboxNetFltWinInterlockedSearchListEntry(pList, &pTDR->ListEntry,
    803803            true /* remove*/);
     
    809809static void vboxNetFltWinPutPacketToList(PINTERLOCKED_SINGLE_LIST pList, PNDIS_PACKET pPacket, PNDIS_BUFFER pOrigBuffer)
    810810{
    811     PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->TransferDataRsvd;
     811    PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd;
    812812    pTDR->pOriginalBuffer = pOrigBuffer;
    813813    vboxNetFltWinInterlockedPutTail(pList, &pTDR->ListEntry);
     
    827827        return false;
    828828
    829     pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->TransferDataRsvd;
     829    pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd;
    830830    Assert(pTDR);
    831831    Assert(pTDR->pOriginalBuffer);
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