- Timestamp:
- Apr 9, 2012 5:24:30 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/libalias/alias_db.c
r40786 r40834 804 804 return 0; 805 805 } 806 807 808 809 806 so->so_laddr.s_addr = la->aliasAddress.s_addr; 807 so->so_lport = htons(port_net); 808 so->so_faddr.s_addr = la->true_addr.s_addr; 809 so->so_fport = la->true_port; 810 810 so->so_hlport = ((struct sockaddr_in *)&sa_addr)->sin_port; 811 811 so->so_hladdr.s_addr = … … 814 814 if (link_type == LINK_TCP) 815 815 { 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 816 int ret = 0; 817 struct sockaddr_in sin; 818 RT_ZERO(sin); 819 sin.sin_family = AF_INET; 820 sin.sin_addr.s_addr = so->so_faddr.s_addr; 821 sin.sin_port = so->so_fport; 822 ret = connect(so->s, (struct sockaddr *)&sin, sizeof(sin)); 823 if ( ret < 0 824 && errno == EINPROGRESS 825 && errno == EAGAIN 826 && errno == EWOULDBLOCK) 827 { 828 closesocket(so->s); 829 RTMemFree(so); 830 return 0; 831 } 832 so->so_state = SS_ISFCONNECTING; /* slirp happy??? */ 833 tcp_attach(la->pData, so); 834 /* tcp_{snd,rcv}space -> pData->tcp_{snd,rcv}space */ 835 835 sbreserve(la->pData, &so->so_snd, la->tcp_sndspace); 836 836 sbreserve(la->pData, &so->so_rcv, la->tcp_rcvspace);
Note:
See TracChangeset
for help on using the changeset viewer.