VirtualBox

Changeset 58631 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Nov 10, 2015 12:10:28 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
104023
Message:

NAT: tcp_fconnect - when DNS proxy is enabled and the target is
port 53 of CTL_DNS, connect to the first resolver in the list in a
kind of reverse port-forwarding. This makes fallback to TCP work with
DNS proxy when reply doesn't fit into UDP 512 bytes payload.

Currently when we have more than one resolver we only forward to the
first one and don't try others.

File:
1 edited

Legend:

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

    r58077 r58631  
    426426            {
    427427                case CTL_DNS:
     428                    /*
     429                     * TCP DNS proxy.  We only support "forwarding" to
     430                     * single server.  We don't have infrastructure in
     431                     * place to re-try connections to other servers.
     432                     */
     433                    if (   pData->fUseDnsProxy
     434                        && so->so_fport == RT_H2N_U16_C(53))
     435                    {
     436                        struct dns_entry *ns = TAILQ_LAST(&pData->pDnsList, dns_list_head);
     437                        if (ns != NULL)
     438                        {
     439                            addr.sin_addr = ns->de_addr;
     440                            break;
     441                        }
     442                    }
     443                    /* FALLTHROUGH */
    428444                case CTL_ALIAS:
    429445                default:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette