Changeset 16070 in vbox
- Timestamp:
- Jan 20, 2009 8:42:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
r15919 r16070 669 669 * Need to emulate the PORT command 670 670 */ 671 struct sockaddr_in addr; 672 socklen_t addrlen = sizeof addr; 673 674 if ( getsockname(so->s,(struct sockaddr *)&addr,&addrlen)) 675 return 1; 676 671 677 x = sscanf(bptr, "ORT %u,%u,%u,%u,%u,%u\r\n%256[^\177]", 672 678 &n1, &n2, &n3, &n4, &n5, &n6, buff); … … 685 691 n6 &= 0xff; 686 692 687 laddr = ntohl( so->so_faddr.s_addr);693 laddr = ntohl(addr.sin_addr.s_addr); 688 694 689 695 n1 = ((laddr >> 24) & 0xff); … … 702 708 * Need to emulate the PASV response 703 709 */ 710 struct sockaddr_in addr; 711 socklen_t addrlen = sizeof addr; 712 713 if ( getsockname(so->s,(struct sockaddr *)&addr,&addrlen)) 714 return 1; 715 704 716 x = sscanf(bptr, "27 Entering Passive Mode (%u,%u,%u,%u,%u,%u)\r\n%256[^\177]", 705 717 &n1, &n2, &n3, &n4, &n5, &n6, buff); … … 718 730 n6 &= 0xff; 719 731 720 laddr = ntohl( so->so_faddr.s_addr);732 laddr = ntohl(addr.sin_addr.s_addr); 721 733 722 734 n1 = ((laddr >> 24) & 0xff);
Note:
See TracChangeset
for help on using the changeset viewer.