]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Oct 2016 19:29:11 +0000 (15:29 -0400)
commit4324731e2fee28454ba0ce7c4787db62637efc19
treebda55b33236870d871bc3402abc8b14f4f262f56
parent7db70259c862660db07c45f2d079f149088ecdb6
net: mangle zero checksum in skb_checksum_help()

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>
net/core/dev.c