VirtualBox

Changeset 108820 in vbox for trunk/src


Ignore:
Timestamp:
Apr 1, 2025 10:39:09 PM (2 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168266
Message:

NAT/libslirp: fixed assert/order bug. bugref:10268

File:
1 edited

Legend:

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

    r107983 r108820  
    739739#ifdef RT_OS_WINDOWS
    740740    drvNAT_AddPollCb(pThis->ahWakeupSockPair[1], SLIRP_POLL_IN | SLIRP_POLL_HUP, pThis);
     741
     742    /* HACK ALERT: while Windows socket handling is weird, do this explicitly. */
    741743    pThis->pNATState->polls[0].fd = pThis->ahWakeupSockPair[1];
    742744#else
     
    17861788    rc = RTWinSocketPair(AF_INET, SOCK_DGRAM, 0, pThis->ahWakeupSockPair);
    17871789    AssertRCReturn(rc, rc);
     1790
     1791    uint32_t hReadFd = 0;
     1792    uint32_t hWriteFd = 0;
     1793
     1794    rc = libslirp_wrap_RTHandleTableAlloc(pThis->ahWakeupSockPair[0], &hReadFd);
     1795    AssertRCReturn(rc, rc);
     1796
     1797    rc = libslirp_wrap_RTHandleTableAlloc(pThis->ahWakeupSockPair[1], &hWriteFd);
     1798    AssertRCReturn(rc, rc);
     1799
     1800    Log4Func(("Created wakeup socket pair.\nSocket details - read:%d, write%d\n \
     1801               Handle details - read:%d, write%d\n", pThis->ahWakeupSockPair[0],
     1802               pThis->ahWakeupSockPair[1], hReadFd, hWriteFd));
     1803
     1804    /**
     1805     * @todo r=jack: should probably use the internal handles up in the io
     1806     * thread. Will fix (or just update libslirp and this translation stuff
     1807     * might go away).
     1808     */
    17881809#else
    17891810    /* Create the control pipe. */
Note: See TracChangeset for help on using the changeset viewer.

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