VirtualBox

Ignore:
Timestamp:
Jul 16, 2009 3:50:35 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50155
Message:

NAT: libalias's links were expired too fast

File:
1 edited

Legend:

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

    r21610 r21630  
    193193/* Parameters used for cleanup of expired links */
    194194/* NOTE: ALIAS_CLEANUP_INTERVAL_SECS must be less then LINK_TABLE_OUT_SIZE */
    195 #define ALIAS_CLEANUP_INTERVAL_SECS  64
    196 #define ALIAS_CLEANUP_MAX_SPOKES     (LINK_TABLE_OUT_SIZE/5)
     195#ifndef VBOX
     196# define ALIAS_CLEANUP_INTERVAL_SECS  64
     197# define ALIAS_CLEANUP_MAX_SPOKES     (LINK_TABLE_OUT_SIZE/5)
    197198
    198199/* Timeouts (in seconds) for different link types */
    199 #define ICMP_EXPIRE_TIME             60
    200 #define UDP_EXPIRE_TIME              60
    201 #define PROTO_EXPIRE_TIME            60
    202 #define FRAGMENT_ID_EXPIRE_TIME      10
    203 #define FRAGMENT_PTR_EXPIRE_TIME     30
     200# define ICMP_EXPIRE_TIME             60
     201# define UDP_EXPIRE_TIME              60
     202# define PROTO_EXPIRE_TIME            60
     203# define FRAGMENT_ID_EXPIRE_TIME      10
     204# define FRAGMENT_PTR_EXPIRE_TIME     30
    204205
    205206/* TCP link expire time for different cases */
    206207/* When the link has been used and closed - minimal grace time to
    207208   allow ACKs and potential re-connect in FTP (XXX - is this allowed?)  */
    208 #ifndef TCP_EXPIRE_DEAD
    209 #define TCP_EXPIRE_DEAD           10
    210 #endif
     209# ifndef TCP_EXPIRE_DEAD
     210# define TCP_EXPIRE_DEAD           10
     211# endif
    211212
    212213/* When the link has been used and closed on one side - the other side
    213214   is allowed to still send data */
    214 #ifndef TCP_EXPIRE_SINGLEDEAD
    215 #define TCP_EXPIRE_SINGLEDEAD     90
    216 #endif
     215# ifndef TCP_EXPIRE_SINGLEDEAD
     216# define TCP_EXPIRE_SINGLEDEAD     90
     217# endif
    217218
    218219/* When the link isn't yet up */
    219 #ifndef TCP_EXPIRE_INITIAL
    220 #define TCP_EXPIRE_INITIAL       300
    221 #endif
     220# ifndef TCP_EXPIRE_INITIAL
     221# define TCP_EXPIRE_INITIAL       300
     222# endif
    222223
    223224/* When the link is up */
    224 #ifndef TCP_EXPIRE_CONNECTED
    225 #define TCP_EXPIRE_CONNECTED   86400
    226 #endif
    227 
     225# ifndef TCP_EXPIRE_CONNECTED
     226# define TCP_EXPIRE_CONNECTED   86400
     227# endif
     228#else /* VBOX */
     229# define ALIAS_CLEANUP_INTERVAL_SECS  (64 * 1000)
     230# define ALIAS_CLEANUP_MAX_SPOKES     (LINK_TABLE_OUT_SIZE/5)
     231
     232/* Timeouts (in seconds) for different link types */
     233# define ICMP_EXPIRE_TIME             (60 * 1000)
     234# define UDP_EXPIRE_TIME              (60 * 1000)
     235# define PROTO_EXPIRE_TIME            (60 * 1000)
     236# define FRAGMENT_ID_EXPIRE_TIME      (10 * 1000)
     237# define FRAGMENT_PTR_EXPIRE_TIME     (30 * 1000)
     238
     239/* TCP link expire time for different cases */
     240/* When the link has been used and closed - minimal grace time to
     241   allow ACKs and potential re-connect in FTP (XXX - is this allowed?)  */
     242# ifndef TCP_EXPIRE_DEAD
     243# define TCP_EXPIRE_DEAD           (10 * 1000)
     244# endif
     245
     246/* When the link has been used and closed on one side - the other side
     247   is allowed to still send data */
     248# ifndef TCP_EXPIRE_SINGLEDEAD
     249# define TCP_EXPIRE_SINGLEDEAD     (90 * 1000)
     250# endif
     251
     252/* When the link isn't yet up */
     253# ifndef TCP_EXPIRE_INITIAL
     254# define TCP_EXPIRE_INITIAL       (300 * 1000)
     255# endif
     256
     257/* When the link is up */
     258# ifndef TCP_EXPIRE_CONNECTED
     259# define TCP_EXPIRE_CONNECTED   (86400 * 1000)
     260# endif
     261#endif
    228262
    229263/* Dummy port number codes used for FindLinkIn/Out() and AddLink().
     
    22712305    int i, n;
    22722306#ifndef VBOX
    2273 #ifndef _KERNEL
     2307# ifndef _KERNEL
    22742308    struct timeval tv;
    22752309    struct timezone tz;
    2276 #endif
     2310# endif
    22772311
    22782312    LIBALIAS_LOCK_ASSERT(la);
     
    22822316     * waste timeline by making system calls.
    22832317     */
    2284 #ifdef  _KERNEL
     2318# ifdef  _KERNEL
    22852319    la->timeStamp = time_uptime;
    2286 #else
     2320# else
    22872321    gettimeofday(&tv, &tz);
    22882322    la->timeStamp = tv.tv_sec;
    2289 #endif
     2323# endif
    22902324#else /* !VBOX */
    22912325    LIBALIAS_LOCK_ASSERT(la);
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