Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1597251
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.2 169/199] net: mangle zero checksum in skb_checksum_help() |
| Date | 2017-03-10 13:10 +0100 |
| Message-ID | <tjrwR-3LF-7@gated-at.bofh.it> (permalink) |
| References | <tjrnb-3sF-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.2.87-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet <edumazet@google.com> [ 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: Ben Hutchings <ben@decadent.org.uk> --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1918,7 +1918,7 @@ int skb_checksum_help(struct sk_buff *sk goto out; } - *(__sum16 *)(skb->data + offset) = csum_fold(csum); + *(__sum16 *)(skb->data + offset) = csum_fold(csum) ?: CSUM_MANGLED_0; out_set_summed: skb->ip_summed = CHECKSUM_NONE; out:
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.2 169/199] net: mangle zero checksum in skb_checksum_help() Ben Hutchings <ben@decadent.org.uk> - 2017-03-10 13:10 +0100
csiph-web