]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
net: mangle zero checksum in skb_checksum_help()
authorEric Dumazet <edumazet@google.com>
Sat, 29 Oct 2016 18:02:36 +0000 (11:02 -0700)
committerIshan Mittal <imittal@nvidia.com>
Fri, 6 Jan 2017 10:18:04 +0000 (15:48 +0530)
commit1eb86605d520dd69dc6acc6c59b849079a1e3c43
treee78205168ecfdd3db036e598e814049933710007
parentdaae1b4683da401c15407549c0b01d781f3f0b62
net: mangle zero checksum in skb_checksum_help()

[ Upstream commit 4f2e4ad56a65f3b7d64c258e373cb71e8d2499f4 ]

Sending zero checksum is ok for TCP, but not for UDP.

UDPv6 receiver should by default drop a frame with a 0 checksum,
and UDPv4 would not verify the checksum and might accept a corrupted
packet.

Simply replace such checksum by 0xffff, regardless of transport.

This error was caught on SIT tunnels, but seems generic.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Acked-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/dev.c