From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FakMF-0007hv-Po for qemu-devel@nongnu.org; Mon, 01 May 2006 22:11:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FakME-0007fY-1J for qemu-devel@nongnu.org; Mon, 01 May 2006 22:11:23 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FakMD-0007fL-RA for qemu-devel@nongnu.org; Mon, 01 May 2006 22:11:21 -0400 Received: from [64.233.162.200] (helo=nz-out-0102.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FakMH-0002Hz-9D for qemu-devel@nongnu.org; Mon, 01 May 2006 22:11:25 -0400 Received: by nz-out-0102.google.com with SMTP id 14so2880770nzn for ; Mon, 01 May 2006 19:11:20 -0700 (PDT) Message-ID: Date: Mon, 1 May 2006 19:11:20 -0700 From: "Ed Swierk" Sender: eswierk@gmail.com Subject: Re: [Qemu-devel] [PATCH] Fix scrambling of >32KB packets in slirp In-Reply-To: <4455EC13.9040000@bellard.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1896_22344787.1146535880606" References: <4455EC13.9040000@bellard.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_1896_22344787.1146535880606 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline T24gNS8xLzA2LCBGYWJyaWNlIEJlbGxhcmQgPGZhYnJpY2VAYmVsbGFyZC5vcmc+IHdyb3RlOgo+ IFdoeSBub3QgY2hhbmdpbmcgdGhlIGRlZmluaXRpb24gaXRzZWxmIHRvIHVpbnQxNl90IGFuZCB2 ZXJpZnlpbmcgZWFjaAo+IG9jY3VyZW5jZSBvZiBpcF9vZmYgYW5kIGlwX2xlbiA/CgpJbmRlZWQs IHdoeSBub3QuIFRoaXMgaXMgdGhlIHNvbHV0aW9uIGFkb3B0ZWQgYnkgQXBwbGUncyBPcGVuRGFy d2luCihhbm90aGVyIEJTRCBkZXJpdmF0aXZlKS4gVGhlIGF0dGFjaGVkIHBhdGNoIGNoYW5nZXMg dGhlIHNpZ25lZApkZWZpbml0aW9ucyB0byB1bnNpZ25lZC4KCkkgdHJpZWQgdG8gdmVyaWZ5IGJ5 IGluc3BlY3RpbmcgZWFjaCBvY2N1cnJlbmNlIG9mIGlwX29mZiBhbmQgaXBfbGVuOwppbiBjYXNl cyB3aGVyZSB0aGUgdmFsdWVzIGFyZSBpbXBsaWNpdGx5IGNvbnZlcnRlZCwgdGhlIHVuc2lnbmVk IHNob3J0CmlzIGNvbnZlcnRlZCB0byBhIHNpZ25lZCBpbnQsIHdoaWNoIHNob3VsZCBiZSBPSyBh c3N1bWluZyAzMi1iaXQgaW50cy4KRG9lcyBxZW11IHN1cHBvcnQgYW55IHBsYXRmb3JtcyB3aXRo IDE2LWJpdCBpbnRzPwoKSSBhbHNvIHJhbiBzb21lIHRlc3RzIChvbiBpMzg2IExpbnV4KSB0byBl bnN1cmUgdGhhdCBzbGlycCBzdGlsbCB3b3JrcwphcyBleHBlY3RlZCwgYW5kIGFsc28gaGFuZGxl cyBwYWNrZXRzID4gMzJLQi4gT2YgY291cnNlLCBtb3JlIHRlc3RpbmcKb24gb3RoZXIgcGxhdGZv cm1zIHdvdWxkIGJlIHdlbGNvbWUuCgotLUVkCg== ------=_Part_1896_22344787.1146535880606 Content-Type: text/x-patch; name=qemu-slirp-unsigned.patch; charset=us-ascii Content-Transfer-Encoding: 7bit X-Attachment-Id: f_emplsrcf Content-Disposition: attachment; filename="qemu-slirp-unsigned.patch" diff -BurN qemu.orig/slirp/ip.h qemu/slirp/ip.h --- qemu.orig/slirp/ip.h 2004-04-22 00:10:47.000000000 +0000 +++ qemu/slirp/ip.h 2006-05-02 02:07:34.000000000 +0000 @@ -75,10 +75,6 @@ /* * Structure of an internet header, naked of options. - * - * We declare ip_len and ip_off to be short, rather than u_short - * pragmatically since otherwise unsigned comparisons can result - * against negative integers quite easily, and fail in subtle ways. */ struct ip { #ifdef WORDS_BIGENDIAN @@ -89,9 +85,9 @@ ip_v:4; /* version */ #endif u_int8_t ip_tos; /* type of service */ - int16_t ip_len; /* total length */ + u_int16_t ip_len; /* total length */ u_int16_t ip_id; /* identification */ - int16_t ip_off; /* fragment offset field */ + u_int16_t ip_off; /* fragment offset field */ #define IP_DF 0x4000 /* don't fragment flag */ #define IP_MF 0x2000 /* more fragments flag */ #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ @@ -212,7 +208,7 @@ caddr32_t ih_next, ih_prev; /* for protocol sequence q's */ u_int8_t ih_x1; /* (unused) */ u_int8_t ih_pr; /* protocol */ - int16_t ih_len; /* protocol length */ + u_int16_t ih_len; /* protocol length */ struct in_addr ih_src; /* source internet address */ struct in_addr ih_dst; /* destination internet address */ }; @@ -253,9 +249,9 @@ u_int8_t ipf_mff; /* XXX overlays ip_tos: use low bit * to avoid destroying tos (PPPDTRuu); * copied from (ip_off&IP_MF) */ - int16_t ip_len; + u_int16_t ip_len; u_int16_t ip_id; - int16_t ip_off; + u_int16_t ip_off; u_int8_t ip_ttl; u_int8_t ip_p; u_int16_t ip_sum; ------=_Part_1896_22344787.1146535880606--