mirror of
https://github.com/xemu-project/xemu.git
synced 2025-01-30 08:32:08 +00:00
suppressed unaligned accesses
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1911 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
73540ca962
commit
38f3e7c2f5
@ -52,8 +52,8 @@ if_init()
|
||||
if_maxlinkhdr = 40;
|
||||
#endif
|
||||
#else
|
||||
/* 14 for ethernet + 40 */
|
||||
if_maxlinkhdr = 14 + 40;
|
||||
/* 2 for alignment, 14 for ethernet, 40 for TCP/IP */
|
||||
if_maxlinkhdr = 2 + 14 + 40;
|
||||
#endif
|
||||
if_mtu = 1500;
|
||||
if_mru = 1500;
|
||||
|
@ -610,11 +610,12 @@ void slirp_input(const uint8_t *pkt, int pkt_len)
|
||||
m = m_get();
|
||||
if (!m)
|
||||
return;
|
||||
m->m_len = pkt_len;
|
||||
memcpy(m->m_data, pkt, pkt_len);
|
||||
/* Note: we add to align the IP header */
|
||||
m->m_len = pkt_len + 2;
|
||||
memcpy(m->m_data + 2, pkt, pkt_len);
|
||||
|
||||
m->m_data += ETH_HLEN;
|
||||
m->m_len -= ETH_HLEN;
|
||||
m->m_data += 2 + ETH_HLEN;
|
||||
m->m_len -= 2 + ETH_HLEN;
|
||||
|
||||
ip_input(m);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user