]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
MIPS: Fix special case in 64 bit IP checksumming.
authorRalf Baechle <ralf@linux-mips.org>
Thu, 26 Jan 2017 01:16:47 +0000 (02:16 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 6 Apr 2017 08:20:30 +0000 (09:20 +0100)
commitb330a944997e6af3e21fc5317842481062b6266d
tree64acbf45ab20622d13f787fe66c4547b5bdb5560
parentda6cfcf657078ef8cf5b775f026c3371fcf6ea0b
MIPS: Fix special case in 64 bit IP checksumming.

BugLink: http://bugs.launchpad.net/bugs/1673538
commit 66fd848cadaa6be974a8c780fbeb328f0af4d3bd upstream.

For certain arguments such as saddr = 0xc0a8fd60, daddr = 0xc0a8fda1,
len = 80, proto = 17, sum = 0x7eae049d there will be a carry when
folding the intermediate 64 bit checksum to 32 bit but the code doesn't
add the carry back to the one's complement sum, thus an incorrect result
will be generated.

Reported-by: Mark Zhang <bomb.zhang@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/mips/include/asm/checksum.h