Changeset 15367 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Dec 12, 2008 2:04:01 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/socket.c
r15365 r15367 795 795 struct icmp_msg *icm; 796 796 uint8_t proto; 797 797 int hlen; 798 799 #ifndef RT_OS_DARWIN 798 800 ip = (struct ip *)buff; 799 801 icp = (struct icmp *)((char *)ip + (ip->ip_hl << 2)); 802 #else 803 icp = (struct icmp *)buff; 804 #endif 800 805 801 806 LogRel(("ICMP:received msg(t:%d, c:%d)\n", icp->icmp_type, icp->icmp_code)); … … 824 829 proto = ip->ip_p; 825 830 /* Now ip is pointing on header we've sent from guest */ 831 hlen = ip->ip_hl << 2; 826 832 if (icp->icmp_type == ICMP_TIMXCEED) 827 833 { 828 old_ip_len = (ip->ip_hl << 2)+ 64;834 old_ip_len = hlen + 64; 829 835 memcpy(ip_copy, ip, old_ip_len); 830 836 } … … 834 840 835 841 /* overide ther tail of old packet */ 842 #ifdef RT_OS_DARWIN 843 /* on Darwin don't have IP header in the buffer */ 844 m->m_data += hlen; 845 m->m_len -= hlen; 846 #endif 836 847 memcpy(m->m_data, buff, len); 837 848 m->m_len = len; 849 #ifdef RT_OS_DARWIN 850 /* on Darwin don't have IP header in the buffer */ 851 m->m_data -= hlen; 852 m->m_len += hlen; 853 #endif 838 854 ip = mtod(m, struct ip *); /* ip is from mbuf we've overrided */ 839 855
Note:
See TracChangeset
for help on using the changeset viewer.