VirtualBox

Changeset 22218 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Aug 13, 2009 5:25:21 AM (15 years ago)
Author:
vboxsync
Message:

#3547: multicast is broken, fixed multicast array matching.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r21969 r22218  
    40594059
    40604060/**
    4061  * Returns the value of a bit in a bit vector.
    4062  *
    4063  * @returns true if bit is set.
    4064  * @param   pBitVector      The ethernet packet.
    4065  * @param   u16Bit          Bit number.
    4066  * @thread  EMT
    4067  */
    4068 DECLINLINE(bool) e1kGetBit(uint32_t* pBitVector, uint16_t u16Bit)
    4069 {
    4070     return !!(pBitVector[u16Bit] & (1 << (u16Bit & 0x1F)));
    4071 }
    4072 
    4073 /**
    40744061 * Matches the packet addresses against Multicast Table Array.
    40754062 *
     
    40984085    if (offset < 3)
    40994086        u16Bit = u16Bit >> (4 - offset);
    4100     return e1kGetBit(pState->auMTA, u16Bit & 0xFFF);
     4087    return ASMBitTest(pState->auMTA, u16Bit & 0xFFF);
    41014088}
    41024089
     
    41814168            pStatus->fVP = true;
    41824169            /* It is 802.1q packet indeed, let's filter by VID */
    4183             if (e1kGetBit(pState->auVFTA, RT_BE2H_U16(u16Ptr[7]) & 0xFFF))
     4170            if (ASMBitTest(pState->auVFTA, RT_BE2H_U16(u16Ptr[7]) & 0xFFF))
    41844171                return true;
    41854172            E1kLog2(("%s Packet filter: no VLAN match\n", INSTANCE(pState)));
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