VirtualBox

Changeset 17363 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 4, 2009 7:28:34 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43761
Message:

NAT: dns proxy functions fine. the time out and switch to next server should be bit tested

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

Legend:

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

    r17302 r17363  
    865865                if (so->so_expire <= curtime)
    866866                {
     867#ifdef VBOX_WITH_SLIRP_DNS_PROXY
     868                    Log2(("NAT: %R[natsock] expired\n", so));
     869                    if (so->so_timeout != NULL)
     870                    {
     871                        so->so_timeout(pData, so, so->so_timeout_arg);
     872                    }
     873#endif
    867874#ifdef VBOX_WITH_SLIRP_MT
    868875                    /* we need so_next for continue our cycle*/
  • trunk/src/VBox/Devices/Network/slirp/socket.c

    r17302 r17363  
    579579             *  Note: Here we can't check if dnsproxy's sent initial request
    580580             */
    581             dnsproxy_answer(pData, so, m, sizeof(struct ip)); 
     581            if (so->so_fport == htons(53))
     582                dnsproxy_answer(pData, so, m); 
    582583#endif
    583584
  • trunk/src/VBox/Devices/Network/slirp/socket.h

    r16818 r17363  
    8181# endif /* RT_OS_WINDOWS */
    8282#endif /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
     83#ifdef VBOX_WITH_SLIRP_DNS_PROXY
     84    void (* so_timeout)(PNATState pData, struct socket *so, void *arg);
     85    void *so_timeout_arg;
     86#endif
    8387};
    8488
  • trunk/src/VBox/Devices/Network/slirp/udp.c

    r17302 r17363  
    402402            SOCKET_LOCK_CREATE(so);
    403403            QSOCKET_LOCK(udb);
    404             insque(pData, so,&udb);
     404            insque(pData, so, &udb);
    405405            NSOCK_INC();
    406406            QSOCKET_UNLOCK(udb);
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