Changeset 27447 in vbox for trunk/src/VBox
- Timestamp:
- Mar 17, 2010 2:14:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/socket.c
r27443 r27447 1111 1111 1112 1112 src = addr->sin_addr.s_addr; 1113 if (type == ICMP_ECHOREPLY) 1114 { 1115 struct ip *ip0 = mtod(m, struct ip *); 1116 struct icmp *icp0 = (struct icmp *)((char *)ip0 + (ip0->ip_hl << 2)); 1117 if (icp0->icmp_type != ICMP_ECHO) 1118 { 1119 Log(("NAT: we haven't found echo for this reply\n")); 1120 return; 1121 } 1122 if ( (RT_N2H_U16(ip->ip_len) - hlen ) 1123 != (ip0->ip_len - (ip0->ip_hl << 2))) /* the IP header in the list is in host format */ 1124 { 1125 Log(("NAT: ECHO lenght doesn't match ECHOREPLY\n")); 1126 return; 1127 } 1128 } 1113 1129 1114 1130 ip = mtod(m, struct ip *); … … 1138 1154 { 1139 1155 int size = m->m_size; 1140 m_inc(m, len); /*increase the room of the mbuf up to len*/ 1156 /* we need involve ether header lenght into new buffer buffer calculation */ 1157 m_inc(m, if_maxlinkhdr + len - hlen + original_hlen); 1141 1158 if (size == m->m_size) 1142 1159 {
Note:
See TracChangeset
for help on using the changeset viewer.