From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix scrambling of >32KB packets in slirp
Date: Mon, 01 May 2006 20:05:50 +0200 [thread overview]
Message-ID: <44564DFE.8040400@bellard.org> (raw)
In-Reply-To: <6fe044190605010919q23dcfa19t1d992211c58f679d@mail.gmail.com>
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 <fabrice@bellard.org> 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
>> Qemu-devel@nongnu.org
>> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>>
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
next prev parent reply other threads:[~2006-05-01 19:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-01 2:55 [Qemu-devel] [PATCH] Fix scrambling of >32KB packets in slirp Ed Swierk
2006-05-01 11:08 ` Fabrice Bellard
2006-05-01 16:19 ` Kenneth Duda
2006-05-01 18:05 ` Fabrice Bellard [this message]
2006-05-02 2:11 ` Ed Swierk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44564DFE.8040400@bellard.org \
--to=fabrice@bellard.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).