Changeset 19411 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- May 6, 2009 6:54:50 AM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/ip_output.c
r19313 r19411 63 63 DEBUG_ARG("so = %lx", (long)so); 64 64 DEBUG_ARG("m0 = %lx", (long)m0); 65 Assert(m->m_data == m->m_dat + if_maxlinkhdr); 65 if(m->m_data != ((caddr_t)m->m_dat + if_maxlinkhdr)) 66 { 67 LogRel(("NAT: ethernet detects corruption of the packet")); 68 AssertMsg(m->m_data == ((caddr_t)m->m_dat + if_maxlinkhdr), ("!!Ethernet frame corrupted!!")); 69 } 66 70 67 71 #if 0 /* We do no options */ -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r19392 r19411 1516 1516 if (memcmp(eh->h_source, special_ethaddr, ETH_ALEN) == 0) 1517 1517 { 1518 goto drop; 1518 /* @todo vasily: add ether logging routine in debug.c */ 1519 Log(("NAT: packet was addressed to other MAC\n")); 1520 RTMemFree((void *)pkt); 1521 return; 1519 1522 } 1520 1523 #endif … … 1562 1565 break; 1563 1566 } 1564 drop:1565 1567 RTMemFree((void *)pkt); 1566 1568 } … … 1575 1577 m->m_len += ETH_HLEN; 1576 1578 eh = mtod(m, struct ethhdr *); 1579 1580 if((caddr_t)eh != (caddr_t)m->m_dat) 1581 { 1582 LogRel(("NAT: ethernet detects corruption of the packet")); 1583 AssertMsg((caddr_t)eh == (caddr_t)m->m_dat, ("!!Ethernet frame corrupted!!")); 1584 } 1577 1585 1578 1586 #ifndef VBOX_WITH_NAT_SERVICE … … 1582 1590 eh->h_source[5] = CTL_ALIAS; 1583 1591 #else 1584 Assert((caddr_t)eh == (caddr_t)m->m_dat);1585 1592 if (memcmp(eh->h_source, special_ethaddr, ETH_ALEN) != 0) 1586 1593 {
Note:
See TracChangeset
for help on using the changeset viewer.