VirtualBox

Ignore:
Timestamp:
Mar 4, 2014 12:51:03 AM (11 years ago)
Author:
vboxsync
Message:

NAT: slirp.c: do DNS init/release in link up/down instead of slirp_init/slirp_term.

File:
1 edited

Legend:

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

    r50045 r50669  
    359359    inet_aton("127.0.0.1", &loopback_addr);
    360360
    361     if (!fUseHostResolver)
    362     {
    363         rc = slirpInitializeDnsSettings(pData);
    364         AssertRCReturn(rc, VINF_NAT_DNS);
    365     }
    366 
    367361    rc = slirpTftpInit(pData);
    368362    AssertRCReturn(rc, VINF_NAT_DNS);
     
    452446{
    453447    struct arp_cache_entry *ac;
     448   
     449    if (link_up == 1)
     450        return;
     451
    454452    link_up = 1;
     453
     454    if (!pData->fUseHostResolverPermanent)
     455        slirpInitializeDnsSettings(pData);
    455456
    456457    if (LIST_EMPTY(&pData->arp_cache))
     
    471472    struct port_forward_rule *rule;
    472473
     474    if (link_up == 0)
     475        return;
     476
     477    slirpReleaseDnsSettings(pData);
     478   
    473479    while ((so = tcb.so_next) != &tcb)
    474480    {
     
    508514
    509515    slirp_link_down(pData);
    510     slirpReleaseDnsSettings(pData);
    511516    ftp_alias_unload(pData);
    512517    nbt_alias_unload(pData);
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