VirtualBox

Changeset 55002 in vbox for trunk/src


Ignore:
Timestamp:
Mar 30, 2015 2:13:48 AM (10 years ago)
Author:
vboxsync
Message:

NAT: sorecvfrom: DNS proxy requests are forwarded to the real resolver,
but its socket's so_faddr is that of the DNS proxy itself, so we _can_
actually detect if the reply needs to be handed to the DNS proxy.

File:
1 edited

Legend:

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

    r54827 r55002  
    779779
    780780            /*
    781              *  last argument should be changed if Slirp will inject IP attributes
    782              *  Note: Here we can't check if dnsproxy's sent initial request
     781             * DNS proxy requests are forwarded to the real resolver,
     782             * but its socket's so_faddr is that of the DNS proxy
     783             * itself.
     784             *
     785             * last argument should be changed if Slirp will inject IP attributes
    783786             */
    784787            if (   pData->fUseDnsProxy
    785                 && so->so_fport == RT_H2N_U16_C(53))
     788                && so->so_fport == RT_H2N_U16_C(53)
     789                && CTL_CHECK(so->so_faddr.s_addr, CTL_DNS))
    786790                dnsproxy_answer(pData, so, m);
    787791
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