VirtualBox

Changeset 17224 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 2, 2009 5:58:38 AM (16 years ago)
Author:
vboxsync
Message:

NAT: Handling localhost's DNS servers

File:
1 edited

Legend:

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

    r17222 r17224  
    405405                }
    406406                LogRel(("NAT: adding %R[IP4] to DNS server list\n", &((struct sockaddr_in *)saddr)->sin_addr));
    407                 da->de_addr.s_addr = ((struct sockaddr_in *)saddr)->sin_addr.s_addr;
     407                if ((((struct sockaddr_in *)saddr)->sin_addr.s_addr & htonl(IN_CLASSA_NET)) == ntohl(INADDR_LOOPBACK & IN_CLASSA_NET)) {
     408                    da->de_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_ALIAS);
     409                }
     410                else
     411                {
     412                    da->de_addr.s_addr = ((struct sockaddr_in *)saddr)->sin_addr.s_addr;
     413                }
    408414                LIST_INSERT_HEAD(&pData->dns_list_head, da, de_list);
    409415            next_dns:   
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