VirtualBox

Changeset 22014 in vbox


Ignore:
Timestamp:
Aug 6, 2009 4:30:36 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50751
Message:

NAT: clearing no-service calculation

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

Legend:

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

    r22013 r22014  
    16551655#endif
    16561656
    1657 uint16_t slirp_get_service(int proto, uint16_t dport, uint16_t sport)
    1658 {
    1659     uint16_t hdport, hsport, service;
    1660     hdport = ntohs(dport);
    1661     hsport = ntohs(sport);
    1662     Log2(("proto: %d, dport: %d sport: %d\n", proto, hdport, hsport));
    1663     service = 0;
    1664 #if 0
    1665     /* Always return 0 here */
    1666     switch (hdport)
    1667     {
    1668         case 500:
    1669                 if (hsport != 500) /* vpnc by default try operate in src:500/dst:500 mode*/
    1670                 /* Not sure why this make Cisco VPN client's connection more stable,
    1671                  * at least on some servers
    1672                  */
    1673                     service = sport;
    1674         break;
    1675     }
    1676 #endif
    1677     Log2(("service : %d\n", service));
    1678     return htons(service);
    1679 }
    1680 
    16811657void slirp_set_dhcp_TFTP_prefix(PNATState pData, const char *tftpPrefix)
    16821658{
  • trunk/src/VBox/Devices/Network/slirp/slirp.h

    r22013 r22014  
    307307int tcp_ctl (PNATState, struct socket *);
    308308struct tcpcb *tcp_drop(PNATState, struct tcpcb *tp, int err);
    309 
    310 uint16_t slirp_get_service(int proto, uint16_t dport, uint16_t sport);
    311309
    312310#define MIN_MRU 128
  • trunk/src/VBox/Devices/Network/slirp/udp.c

    r22013 r22014  
    204204        if ((so = socreate()) == NULL)
    205205            goto bad;
    206         if (udp_attach(pData, so, slirp_get_service(IPPROTO_UDP, uh->uh_dport, uh->uh_sport)) == -1)
     206        if (udp_attach(pData, so, 0) == -1)
    207207        {
    208208            DEBUG_MISC((dfd," udp_attach errno = %d-%s\n",
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