VirtualBox

Changeset 20388 in vbox for trunk/src


Ignore:
Timestamp:
Jun 8, 2009 9:29:06 AM (16 years ago)
Author:
vboxsync
Message:

NAT: range 8k-1M

File:
1 edited

Legend:

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

    r20379 r20388  
    18661866} while (0)
    18671867
    1868 /* don't allow user set negative and more than 1M values */
    1869 #define _1M_CHECK_ARG(name, val) CHECK_ARG(name, (val), 0, 1024)
     1868/* don't allow user set less 8kB and more than 1M values */
     1869#define _8K_1M_CHECK_ARG(name, val) CHECK_ARG(name, (val), 8, 1024)
    18701870void slirp_set_rcvbuf(PNATState pData, int kilobytes)
    18711871{
    1872     _1M_CHECK_ARG("SOCKET_RCVBUF", kilobytes);   
     1872    _8K_1M_CHECK_ARG("SOCKET_RCVBUF", kilobytes);   
    18731873    pData->socket_rcv = kilobytes;
    18741874}
    18751875void slirp_set_sndbuf(PNATState pData, int kilobytes)
    18761876{
    1877     _1M_CHECK_ARG("SOCKET_SNDBUF", kilobytes);   
     1877    _8K_1M_CHECK_ARG("SOCKET_SNDBUF", kilobytes);   
    18781878    pData->socket_snd = kilobytes * _1K;
    18791879}
    18801880void slirp_set_tcp_rcvspace(PNATState pData, int kilobytes)
    18811881{
    1882     _1M_CHECK_ARG("TCP_RCVSPACE", kilobytes);   
     1882    _8K_1M_CHECK_ARG("TCP_RCVSPACE", kilobytes);   
    18831883    tcp_rcvspace = kilobytes * _1K;
    18841884}
    18851885void slirp_set_tcp_sndspace(PNATState pData, int kilobytes)
    18861886{
    1887     _1M_CHECK_ARG("TCP_SNDSPACE", kilobytes);   
     1887    _8K_1M_CHECK_ARG("TCP_SNDSPACE", kilobytes);   
    18881888    tcp_sndspace = kilobytes * _1K;
    18891889}
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