qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix scrambling of >32KB packets in slirp


From: Ed Swierk
Subject: Re: [Qemu-devel] [PATCH] Fix scrambling of >32KB packets in slirp
Date: Mon, 1 May 2006 19:11:20 -0700

On 5/1/06, Fabrice Bellard <address@hidden> wrote:
Why not changing the definition itself to uint16_t and verifying each
occurence of ip_off and ip_len ?

Indeed, why not. This is the solution adopted by Apple's OpenDarwin
(another BSD derivative). The attached patch changes the signed
definitions to unsigned.

I tried to verify by inspecting each occurrence of ip_off and ip_len;
in cases where the values are implicitly converted, the unsigned short
is converted to a signed int, which should be OK assuming 32-bit ints.
Does qemu support any platforms with 16-bit ints?

I also ran some tests (on i386 Linux) to ensure that slirp still works
as expected, and also handles packets > 32KB. Of course, more testing
on other platforms would be welcome.

--Ed

Attachment: qemu-slirp-unsigned.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]