Changeset 19525 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- May 8, 2009 1:53:56 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/ip_output.c
r19411 r19525 63 63 DEBUG_ARG("so = %lx", (long)so); 64 64 DEBUG_ARG("m0 = %lx", (long)m0); 65 if(m->m_data != ( (caddr_t)m->m_dat+ if_maxlinkhdr))65 if(m->m_data != (MBUF_HEAD(m) + if_maxlinkhdr)) 66 66 { 67 67 LogRel(("NAT: ethernet detects corruption of the packet")); 68 AssertMsg (m->m_data == ((caddr_t)m->m_dat + if_maxlinkhdr),("!!Ethernet frame corrupted!!"));68 AssertMsgFailed(("!!Ethernet frame corrupted!!")); 69 69 } 70 70 -
trunk/src/VBox/Devices/Network/slirp/mbuf.h
r15453 r19525 142 142 struct mbuf * dtom _P((PNATState, void *)); 143 143 144 /* 145 * this macro should be used for validation and copying of Ethernet header where it really requred 146 */ 147 #define MBUF_HEAD(m) ((caddr_t)(((m)->m_flags & M_EXT) ? (m)->m_ext : (m)->m_dat)) 148 144 149 #endif -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r19411 r19525 1578 1578 eh = mtod(m, struct ethhdr *); 1579 1579 1580 if( (caddr_t)eh != (caddr_t)m->m_dat)1580 if(MBUF_HEAD(m) != m->m_data) 1581 1581 { 1582 1582 LogRel(("NAT: ethernet detects corruption of the packet")); 1583 AssertMsg ((caddr_t)eh == (caddr_t)m->m_dat,("!!Ethernet frame corrupted!!"));1583 AssertMsgFailed(("!!Ethernet frame corrupted!!")); 1584 1584 } 1585 1585
Note:
See TracChangeset
for help on using the changeset viewer.