VirtualBox

Changeset 39465 in vbox


Ignore:
Timestamp:
Nov 30, 2011 1:17:13 AM (13 years ago)
Author:
vboxsync
Message:

NAT: fixed typo (thanks Knut). This changeset adds comment to assignment in slirp_init and changes value really
providing default value for pData->soConnMax. slirp_set_somaxconn release log messages are prefixed with "NAT:" and
shows values changing.

Location:
trunk/src/VBox/Devices/Network
Files:
2 edited

Legend:

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

    r39248 r39465  
    12181218    i32AliasMode |= (i32MainAliasMode & 0x2 ? 0x40 : 0);
    12191219    i32AliasMode |= (i32MainAliasMode & 0x4 ? 0x4 : 0);
    1220     int i32SoMaxConn = 1;
     1220    int i32SoMaxConn = 10;
    12211221    GET_S32(rc, pThis, pCfg, "SoMaxConnection", i32SoMaxConn);
    12221222    /*
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r39444 r39465  
    605605    tcp_sndspace = 64 * _1K;
    606606    tcp_rcvspace = 64 * _1K;
     607    /**
     608     * Assignment here has only meaning, to avoid additional noise in release log
     609     * the value set from DrvNAT in function slirp_set_somaxcon, reading CFGM key
     610     * "VBoxInternal/Devices/<adapter name>/0/LUN#0/Config/SoMaxConnection" or setting
     611     * default value 10 (xTracker/5983) in case value for the key wasn't found.
     612     */
    607613    pData->soMaxConn = 10;
    608614
     
    20122018    if (iSoMaxConn > SOMAXCONN)
    20132019    {
    2014         LogRel(("New value of somaxconn(%d) bigger than SOMAXCONN(%d)\n", iSoMaxConn, SOMAXCONN));
     2020        LogRel(("NAT: value of somaxconn(%d) bigger than SOMAXCONN(%d)\n", iSoMaxConn, SOMAXCONN));
    20152021        iSoMaxConn = SOMAXCONN;
    20162022    }
    2017     pData->soMaxConn = iSoMaxConn > 0 ? iSoMaxConn : pData->soMaxConn;
    2018     if (pData->soMaxConn > 1)
    2019         LogRel(("New value of somaxconn: %d\n", pData->soMaxConn));
     2023    if (pData->soMaxConn != iSoMaxConn)
     2024    {
     2025        LogRel(("NAT: value of somaxconn has been changed from %d to %d\n",
     2026                pData->soMaxConn, iSoMaxConn));
     2027        pData->soMaxConn = iSoMaxConn;
     2028    }
    20202029    LogFlowFuncLeave();
    20212030}
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