mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-19 09:30:56 +00:00
Merge from the QEMU tree:
- Fix IP packet re-assembly logic (Ed Swierk) - Suppress unaligned accesses (Fabrice Bellard)
This commit is contained in:
parent
e339993b22
commit
e4f5757403
@ -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;
|
||||
|
@ -344,8 +344,8 @@ insert:
|
||||
while (q != (struct ipasfrag *)fp) {
|
||||
struct mbuf *t;
|
||||
t = dtom(q);
|
||||
m_cat(m, t);
|
||||
q = (struct ipasfrag *) q->ipf_next;
|
||||
m_cat(m, t);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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…
Reference in New Issue
Block a user