VirtualBox

Changeset 17444 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 6, 2009 9:58:16 AM (16 years ago)
Author:
vboxsync
Message:

setIpConfig: prefixLength2IPv6Address fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/netif.h

    r17419 r17444  
    105105        return VERR_INVALID_PARAMETER;
    106106
    107     ULONG index    = cPrefix >> 3;
    108     ULONG subindex = cPrefix & 0x7;
    109     ULONG i;
     107    memset(aAddrPtr, 0, sizeof(RTNETADDRIPV6));
    110108
    111     for(i = 0; i < index; i++)
    112         aAddrPtr->au8[i] = ~0;
    113 
    114     for(i = index + 1; i < 16; i++)
    115         aAddrPtr->au8[i] = 0;
    116 
    117     if(subindex)
    118         aAddrPtr->au32[index] = (~0) >> (8 - subindex);
     109    ASMBitSetRange(aAddrPtr, 0, cPrefix);
    119110
    120111    return VINF_SUCCESS;
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