Changeset 15769 in vbox
- Timestamp:
- Dec 29, 2008 9:31:21 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r15768 r15769 1038 1038 /* Note: we add to align the IP header */ 1039 1039 1040 #if 0 1041 m->m_data += 2 + ETH_HLEN; 1042 m->m_len -= 2 + ETH_HLEN; 1043 #endif 1040 if (M_FREEROOM(m) < pkt_len) 1041 { 1042 m_inc(m, pkt_len); 1043 } 1044 m->m_len = pkt_len; 1045 memcpy(m->m_data, pkt, pkt_len); 1044 1046 1045 1047 proto = ntohs(*(uint16_t *)(pkt + 12)); … … 1047 1049 { 1048 1050 case ETH_P_ARP: 1049 memcpy(m->m_data, pkt, pkt_len);1050 m->m_len = pkt_len;1051 1051 arp_input(pData, m); 1052 1052 break; … … 1055 1055 * the first outgoing connection gets an incorrect timestamp. */ 1056 1056 updtime(pData); 1057 if (M_FREEROOM(m) < pkt_len + 2) 1058 { 1059 m_inc(m, pkt_len + 2); 1060 } 1061 m->m_len = pkt_len + 2; 1062 memcpy(m->m_data + 2, pkt, pkt_len); 1063 m->m_data += 2 + ETH_HLEN; 1064 m->m_len -= 2 + ETH_HLEN; 1057 m->m_data += ETH_HLEN; 1058 m->m_len -= ETH_HLEN; 1065 1059 ip_input(pData, m); 1066 1060 break; 1067 1061 default: 1062 LogRel(("Unsupported protocol %x\n", proto)); 1063 m_free(pData, m); 1068 1064 break; 1069 1065 }
Note:
See TracChangeset
for help on using the changeset viewer.