VirtualBox

Ignore:
Timestamp:
Feb 24, 2014 11:13:52 PM (11 years ago)
Author:
vboxsync
Message:

VBoxServiceVMInfo.cpp: Attempt at socket address length fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp

    r50565 r50566  
    11571157     *       interface will get multiple entries for one physical interface.
    11581158     */
    1159 #ifdef RT_OS_OS2
     1159# ifdef RT_OS_OS2
    11601160    struct ifreq   *pPrevLinkAddr = NULL;
    1161 #endif
     1161# endif
    11621162    struct ifreq   *pCur   = IfConf.ifc_req;
    11631163    size_t          cbLeft = IfConf.ifc_len;
     
    11661166        /* Figure the size of the current request. */
    11671167        size_t const cbCur = RT_OFFSETOF(struct ifreq, ifr_addr)
     1168# ifdef SA_LEN
     1169                           + RT_MAX(sizeof(struct sockaddr), SA_LEN(pCur->ifr_addr));
     1170# else
    11681171                           + RT_MAX(sizeof(struct sockaddr), pCur->ifr_addr.sa_len);
     1172# endif
    11691173        AssertBreak(cbCur <= cbLeft);
    11701174
    1171 #ifdef RT_OS_OS2
     1175# ifdef RT_OS_OS2
    11721176        /* On OS/2 we get the MAC address in the AF_LINK that the BSD 4.4 stack
    11731177           emits.  We boldly ASSUME these always comes first. */
     
    11751179            && ((struct sockaddr_dl *)&pCur->ifr_addr)->sdl_alen == 6)
    11761180            pPrevLinkAddr = pCur;
    1177 #endif
     1181# endif
    11781182
    11791183        /* Skip it if it's not the kind of address we're looking for. */
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