VirtualBox

Changeset 38068 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 19, 2011 12:35:11 PM (13 years ago)
Author:
vboxsync
Message:

NAT: experiment with NAT connection (2), attempt to fix xTracker/5742.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r38044 r38068  
    967967         */
    968968        /* @todo: vvl - check which predicat here will be more useful here in rerm of new sbufs. */
    969         if (CONN_CANFRCV(so) && (SBUF_LEN(&so->so_snd) < (SBUF_SIZE(&so->so_snd)/2)))
     969        if (   CONN_CANFRCV(so)
     970            && (SBUF_LEN(&so->so_snd) < (SBUF_SIZE(&so->so_snd)/2))
     971#ifdef NAT_CONNECT_EXPERIMENT
     972            && !(so->so_state & SS_ISFCONNECTING)
     973#endif
     974        )
    970975        {
    971976            STAM_COUNTER_INC(&pData->StatTCPHot);
     
    11671172# ifdef RT_OS_WINDOWS
    11681173            /**
    1169              * In some cases FD_CONNECT comes with FD_OOB, that confuse tcp processing.
     1174             * In some cases FD_CLOSE comes with FD_OOB, that confuse tcp processing.
    11701175             */
    1171             && !WIN_CHECK_FD_SET(so, NetworkEvents, connectfds)
     1176            && !WIN_CHECK_FD_SET(so, NetworkEvents, closefds)
    11721177# endif
    11731178#endif
     
    11831188                 || WIN_CHECK_FD_SET(so, NetworkEvents, acceptds))
    11841189        {
     1190
    11851191#ifdef DEBUG_vvl
    11861192            Assert(((so->so_state & SS_ISFCONNECTING) == 0));
     1193#endif
     1194#ifdef NAT_CONNECT_EXPERIMENT
     1195            if (WIN_CHECK_FD_SET(so, NetworkEvents, connectfds))
     1196            {
     1197                TCP_ENGAGE_EVENT2(so, readfds, acceptds);
     1198                goto dont_read_now;
     1199            }
    11871200#endif
    11881201            /*
     
    12001213            if (RT_LIKELY(ret > 0))
    12011214                TCP_OUTPUT(pData, sototcpcb(so));
     1215#ifdef NAT_CONNECT_EXPERIMENT
     1216dont_read_now:;
     1217#endif
    12021218        }
    12031219
     
    15921608    size_t mlen = 0;
    15931609    STAM_PROFILE_START(&pData->StatIF_encap, a);
     1610    LogFlowFunc(("ENTER: pData:%p, eth_proto:%RX16, m:%p, flags:%d\n",
     1611                pData, eth_proto, m, flags));
    15941612
    15951613    M_ASSERTPKTHDR(m);
     
    16321650    mbuf = mtod(m, uint8_t *);
    16331651    eh->h_proto = RT_H2N_U16(eth_proto);
     1652    LogFunc(("eh(dst:%RTmac, src:%RTmac)\n", eh->h_dest, eh->h_source));
    16341653    if (flags & ETH_ENCAP_URG)
    16351654        slirp_urg_output(pData->pvUser, m, mbuf, mlen);
     
    16381657done:
    16391658    STAM_PROFILE_STOP(&pData->StatIF_encap, a);
     1659    LogFlowFuncLeave();
    16401660}
    16411661
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