Changeset 15573 in vbox for trunk/src/VBox/Devices/Network/slirp/socket.c
- Timestamp:
- Dec 16, 2008 11:24:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/socket.c
r15458 r15573 795 795 struct icmp *icp; 796 796 int old_ip_len; 797 int hlen, original_hlen ;797 int hlen, original_hlen = 0; 798 798 struct mbuf *m; 799 799 struct icmp_msg *icm; … … 805 805 806 806 LogRel(("ICMP:received msg(t:%d, c:%d)\n", icp->icmp_type, icp->icmp_code)); 807 if ( icp->icmp_type != ICMP_ECHOREPLY808 && icp->icmp_type != ICMP_TIMXCEED 807 if ( icp->icmp_type != ICMP_ECHOREPLY 808 && icp->icmp_type != ICMP_TIMXCEED 809 809 && icp->icmp_type != ICMP_UNREACH) 810 810 { … … 812 812 } 813 813 814 if ( icp->icmp_type == ICMP_TIMXCEED815 || icp->icmp_type == ICMP_UNREACH 814 if ( icp->icmp_type == ICMP_TIMXCEED 815 || icp->icmp_type == ICMP_UNREACH) 816 816 ip = &icp->icmp_ip; 817 817 … … 832 832 proto = ip->ip_p; 833 833 /* Now ip is pointing on header we've sent from guest */ 834 if ( icp->icmp_type == ICMP_TIMXCEED835 || 834 if ( icp->icmp_type == ICMP_TIMXCEED 835 || icp->icmp_type == ICMP_UNREACH) 836 836 { 837 837 old_ip_len = (ip->ip_hl << 2) + 64; 838 if (old_ip_len > sizeof(ip_copy)) 839 old_ip_len = sizeof(ip_copy); 838 840 memcpy(ip_copy, ip, old_ip_len); 839 841 } … … 852 854 853 855 icp = (struct icmp *)((char *)ip + (ip->ip_hl << 2)); 854 if ( icp->icmp_type == ICMP_TIMXCEED856 if ( icp->icmp_type == ICMP_TIMXCEED 855 857 || icp->icmp_type == ICMP_UNREACH) 856 858 { … … 866 868 /* Don't call m_free here*/ 867 869 868 if ( icp->icmp_type == ICMP_TIMXCEED870 if ( icp->icmp_type == ICMP_TIMXCEED 869 871 || icp->icmp_type == ICMP_UNREACH) 870 872 {
Note:
See TracChangeset
for help on using the changeset viewer.