linux/include
Dave Johnson 1d464c26b5 [MIPS] Fix wrong checksum for split TCP packets on 64-bit MIPS
I've traced down an off-by-one TCP checksum calculation error under
the following conditions:

1) The TCP code needs to split a full-sized packet due to a reduced
   MSS (typically due to the addition of TCP options mid-stream like
   SACK).
   _AND_
2) The checksum of the 2nd fragment is larger than the checksum of the
   original packet.  After subtraction this results in a checksum for
   the 1st fragment with bits 16..31 set to 1. (this is ok)
   _AND_
3) The checksum of the 1st fragment's TCP header plus the previously
   32bit checksum of the 1st fragment DOES NOT cause a 32bit overflow
   when added together.  This results in a checksum of the TCP header
   plus TCP data that still has the upper 16 bits as 1's.
   _THEN_
4) The TCP+data checksum is added to the checksum of the pseudo IP
   header with csum_tcpudp_nofold() incorrectly (the bug).
    
The problem is the checksum of the TCP+data is passed to
csum_tcpudp_nofold() as an 32bit unsigned value, however the assembly
code acts on it as if it is a 64bit unsigned value.

This causes an incorrect 32->64bit extension if the sum has bit 31
set.  The resulting checksum is off by one.
    
This problems is data and TCP header dependent due to #2 and #3
above so it doesn't occur on every TCP packet split.
    
Signed-off-by: Dave Johnson <djohnson+linux-mips@sw.starentnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-20 14:58:37 +01:00
..
acpi Pull bugzilla-8171 into release branch 2007-03-20 11:06:00 -04:00
asm-alpha alpha: build fixes - force architecture 2007-04-17 16:36:27 -07:00
asm-arm [ARM] 4298/1: fix memory barriers for DMA coherent and SMP platforms 2007-04-01 22:38:36 +01:00
asm-arm26 Storage class should be before const qualifier 2007-02-17 20:11:19 +01:00
asm-avr32 [PATCH] gpio_direction_output() needs an initial value 2007-03-16 19:25:04 -07:00
asm-cris
asm-frv [PATCH] FRV: Add some missng lazy MMU hooks for NOMMU mode 2007-03-01 14:53:36 -08:00
asm-generic [PATCH] Proper fix for highmem kmap_atomic functions for VMI for 2.6.21 2007-04-08 19:47:55 -07:00
asm-h8300
asm-i386 [PATCH] Proper fix for highmem kmap_atomic functions for VMI for 2.6.21 2007-04-08 19:47:55 -07:00
asm-ia64 [IA64] SGI Altix : fix pcibr_dmamap_ate32() bug 2007-04-06 15:38:12 -07:00
asm-m32r [PATCH] m32r dma-mapping.h should simply include generic/dma-mapping-broken.h 2007-03-14 15:27:49 -07:00
asm-m68k [PATCH] m68k dma-mapping: gfp_t annotations 2007-03-14 15:27:51 -07:00
asm-m68knommu [PATCH] m68knommu: GPIO line defines for the ColdFire 5282 2007-03-06 18:08:38 -08:00
asm-mips [MIPS] Fix wrong checksum for split TCP packets on 64-bit MIPS 2007-04-20 14:58:37 +01:00
asm-parisc Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2007-02-26 12:48:06 -08:00
asm-powerpc allow vmsplice to work in 32-bit mode on ppc64 2007-04-17 16:36:26 -07:00
asm-ppc
asm-s390 [S390] Fix TCP/UDP pseudo header checksum computation. 2007-03-26 20:43:46 +02:00
asm-sh sh: Trivial fix for hp6xx build. 2007-03-28 19:45:59 +09:00
asm-sh64
asm-sparc [SPARC]: Add unsigned to unused bit field in a.out.h 2007-04-02 14:26:21 -07:00
asm-sparc64 [SPARC]: Add unsigned to unused bit field in a.out.h 2007-04-02 14:26:21 -07:00
asm-um [PATCH] uml: fix unreasonably long udelay 2007-04-02 10:06:08 -07:00
asm-v850
asm-x86_64 [PATCH] x86_64 irq: Fix comments after changing IRQ0_VECTOR from 0x20 to 0x30 2007-03-29 08:16:23 -07:00
asm-xtensa
crypto
keys
linux Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-17 16:51:32 -07:00
math-emu
media V4L/DVB (5441): Saa7146: Fix allocation of clipping memory 2007-03-27 08:45:56 -03:00
mtd
net [IFB]: Fix crash on input device removal 2007-03-29 11:46:52 -07:00
pcmcia serial: Add PCMCIA IDs for Quatech DSP-100 dual RS232 adapter. 2007-02-16 15:19:16 -08:00
rdma RDMA/cma: Add multicast communication support 2007-02-16 14:29:07 -08:00
rxrpc
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-02-19 13:32:28 -08:00
sound [ALSA] version 1.0.14rc3 2007-03-14 08:25:52 +01:00
video
Kbuild