[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] user networking - win xp quest, amd64 linux host
From: |
Juergen Lock |
Subject: |
Re: [Qemu-devel] user networking - win xp quest, amd64 linux host |
Date: |
Mon, 9 May 2005 19:26:33 +0200 |
On Mon, May 09, 2005 at 10:37:04AM -0400, Leonardo E. Reiter wrote:
> We have seen problems on the AMD64 with -user-net as well. While we
> have not been able to debug further yet, I suspect what is happening is
> that some 32-bit values in packet headers that SLIRP is decoding are
> actually represented as 64-bit types on 64-bit processors. Again, this
> is just a guess, but it's the first place we'll look once we get to it,
> since we think it's the most likely cause.
>
> - Leo Reiter
There are a few cases of `long' being used when apparently (u)int32_t was
meant. Not sure i catched them all, but try this patch: (Unfortunately
I don't have an amd64 box here so I cant test it myself...)
Index: slirp/bootp.h
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/bootp.h,v
retrieving revision 1.1
diff -u -r1.1 bootp.h
--- slirp/bootp.h 22 Apr 2004 00:10:47 -0000 1.1
+++ slirp/bootp.h 9 May 2005 17:11:55 -0000
@@ -97,7 +98,7 @@
uint8_t bp_htype;
uint8_t bp_hlen;
uint8_t bp_hops;
- unsigned long bp_xid;
+ uint32_t bp_xid;
unsigned short bp_secs;
unsigned short unused;
struct in_addr bp_ciaddr;
Index: slirp/ip_icmp.h
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/ip_icmp.h,v
retrieving revision 1.1
diff -u -r1.1 ip_icmp.h
--- slirp/ip_icmp.h 22 Apr 2004 00:10:47 -0000 1.1
+++ slirp/ip_icmp.h 9 May 2005 17:11:56 -0000
@@ -83,7 +83,7 @@
struct ip idi_ip;
/* options and then 64 bits of data */
} id_ip;
- u_long id_mask;
+ uint32_t id_mask;
char id_data[1];
} icmp_dun;
#define icmp_otime icmp_dun.id_ts.its_otime
Index: slirp/udp.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/udp.c,v
retrieving revision 1.4
diff -u -r1.4 udp.c
--- slirp/udp.c 7 Oct 2004 23:27:35 -0000 1.4
+++ slirp/udp.c 9 May 2005 17:11:56 -0000
@@ -423,7 +423,7 @@
char dest[8];
short family;
u_short port;
- u_long addr;
+ uint32_t addr;
} *cu_head;
switch(so->so_emu) {
@@ -611,7 +611,7 @@
return;
cu_head = mtod(m, struct cu_header *);
cu_head->port = addr.sin_port;
- cu_head->addr = (u_long) our_addr.s_addr;
+ cu_head->addr = (uint32_t) our_addr.s_addr;
}
return;
- Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, (continued)
Re: Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Ben Taylor, 2005/05/08
- Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Adrian Smarzewski, 2005/05/08
- Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Adrian Smarzewski, 2005/05/09
- Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Leonardo E. Reiter, 2005/05/09
- Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Adrian Smarzewski, 2005/05/09
- Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Leonardo E. Reiter, 2005/05/09
- Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Adrian Smarzewski, 2005/05/09
- Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Adrian Smarzewski, 2005/05/09
Re: [Qemu-devel] user networking - win xp quest, amd64 linux host,
Juergen Lock <=
Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Adrian Smarzewski, 2005/05/09
Re: [Qemu-devel] user networking - win xp quest, amd64 linux host, Jung-uk Kim, 2005/05/09