SLiRP 64-bit fixes. Originally written by Gleb Natapov for QEMU.
This commit is contained in:
parent
03749ab0fb
commit
5a957e5d00
11 changed files with 156 additions and 233 deletions
|
|
@ -128,8 +128,7 @@ udp_input(m, iphlen)
|
|||
* Checksum extended UDP header and data.
|
||||
*/
|
||||
if (udpcksum && uh->uh_sum) {
|
||||
((struct ipovly *)ip)->ih_next = 0;
|
||||
((struct ipovly *)ip)->ih_prev = 0;
|
||||
memset(&((struct ipovly *)ip)->ih_mbuf, 0, sizeof(struct mbuf_ptr));
|
||||
((struct ipovly *)ip)->ih_x1 = 0;
|
||||
((struct ipovly *)ip)->ih_len = uh->uh_ulen;
|
||||
/* keep uh_sum for ICMP reply
|
||||
|
|
@ -272,7 +271,7 @@ int udp_output2(struct SLIRPsocket *so, struct SLIRPmbuf *m,
|
|||
* and addresses and length put into network format.
|
||||
*/
|
||||
ui = mtod(m, struct udpiphdr *);
|
||||
ui->ui_next = ui->ui_prev = 0;
|
||||
memset(&ui->ui_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr));
|
||||
ui->ui_x1 = 0;
|
||||
ui->ui_pr = IPPROTO_UDP;
|
||||
ui->ui_len = htons(m->m_len - sizeof(struct ip)); /* + sizeof (struct udphdr)); */
|
||||
|
|
|
|||
Loading…
Reference in a new issue