VirtualBox

Changeset 29506 in vbox


Ignore:
Timestamp:
May 17, 2010 7:14:47 AM (15 years ago)
Author:
vboxsync
Message:

NAT: backed r61642, pospone till 3.2.2.

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
4 edited

Legend:

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

    r29505 r29506  
    636636    struct in_addr req_ip;
    637637    int fDhcpDiscover = 0;
    638     uint8_t *parameter_list = NULL;
    639638    struct mbuf *m = NULL;
    640639
     
    652651    if (p == NULL)
    653652        return;
    654     /*
    655      * We're going update dns list at least once per DHCP transaction (!not on every operation
    656      * within transaction), assuming that transaction can't be longer than 1 min.
    657      */
    658     if (   !pData->fUseHostResolver
    659            && (   pData->dnsLastUpdate == 0
    660                || curtime - pData->dnsLastUpdate > 60 * 1000)) /* one minute*/
    661     {
    662         uint8_t i = 2; /* i = 0 - tag, i == 1 - length */
    663         parameter_list = dhcp_find_option(&bp->bp_vend[0], RFC2132_PARAM_LIST);
    664         for (;parameter_list && i < parameter_list[1]; ++i)
    665         {
    666             if (parameter_list[i] == RFC1533_DNS)
    667             {
    668                 slirp_release_dns_list(pData);
    669                 slirp_init_dns_list(pData);
    670                 pData->dnsLastUpdate = curtime;
    671                 break;
    672             }
    673         }
    674     }
    675653
    676654#ifndef VBOX_WITH_SLIRP_BSD_MBUF
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r29505 r29506  
    532532#endif /* !RT_OS_WINDOWS */
    533533
    534 int slirp_init_dns_list(PNATState pData)
     534static int slirp_init_dns_list(PNATState pData)
    535535{
    536536    TAILQ_INIT(&pData->pDnsList);
     
    539539}
    540540
    541 void slirp_release_dns_list(PNATState pData)
     541static void slirp_release_dns_list(PNATState pData)
    542542{
    543543    struct dns_entry *pDns = NULL;
  • trunk/src/VBox/Devices/Network/slirp/slirp.h

    r29505 r29506  
    341341void slirp_arp_cache_add(PNATState pData, uint32_t ip, const uint8_t *ether);
    342342int slirp_arp_cache_update_or_add(PNATState pData, uint32_t dst, const uint8_t *mac);
    343 int slirp_init_dns_list(PNATState pData);
    344 void slirp_release_dns_list(PNATState pData);
    345343#define MIN_MRU 128
    346344#define MAX_MRU 16384
  • trunk/src/VBox/Devices/Network/slirp/slirp_state.h

    r29505 r29506  
    175175    struct in_addr tftp_server;
    176176    struct in_addr loopback_addr;
    177     uint32_t dnsLastUpdate;
    178177    uint32_t netmask;
    179178#ifndef VBOX_WITH_NAT_SERVICE
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