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: Fabrice Bellard
Subject: Re: [Qemu-devel] [PATCH] Fix scrambling of >32KB packets in slirp
Date: Mon, 01 May 2006 20:05:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Yes, I would prefer that you resubmit a patch using unsigned types.

Fabrice.

Kenneth Duda wrote:
Well that is a good question.  When I made this patch, I wanted to
respect the comment in the code that the author felt that using a
signed data type was safer in some cases.  However, I will admit that
I do not understand this reasoning, and I agree that switching to an
unsigned data type would be better.  Would you like us to resubmit
this patch in that form?

   -Ken

On 5/1/06, Fabrice Bellard <address@hidden> wrote:

Ed Swierk wrote:
> In several places in qemu's slirp code, signed and unsigned ints are
> used interchangeably when dealing with IP packet lengths and offsets.
> This causes IP packets greater than 32K in length to be scrambled in
> various interesting ways that are extremely difficult to troubleshoot.
>
> Although large IP packets are fairly rare in practice, certain
> UDP-based protocols like NFS use them extensively.
>
> The attached patch wraps IP packet lengths and offsets in macros that
> ensure they are always properly treated as unsigned values.

Why not changing the definition itself to uint16_t and verifying each
occurence of ip_off and ip_len ?

Fabrice.


_______________________________________________
Qemu-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/qemu-devel



_______________________________________________
Qemu-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/qemu-devel







reply via email to

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