From: Eric Dumazet <eric.dumazet@gmail.com>
To: Wolfgang Walter <linux@stwm.de>
Cc: Vlad Yasevich <vyasevich@gmail.com>, netdev <netdev@vger.kernel.org>
Subject: [PATCH net] Revert "ipv6: Allow for partial checksums on non-ufo packets"
Date: Fri, 08 May 2015 15:22:45 -0700 [thread overview]
Message-ID: <1431123765.22756.51.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <1431122268.22756.41.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <edumazet@google.com>
Wolfgang Walter reported crashes using traceroute6, root caused to this
commit.
UDP packets can be sent from RAW sockets.
Note that the faulty commit addressed a non problem, as normal
UDP v6 packets use udp_v6_send_skb() which correctly setup
CHECKSUM_PARTIAL properly if device has the correct feature.
It seems not worth trying to 'fix' the raw path.
Fixes: 32dce968dd98 ("ipv6: Allow for partial checksums on non-ufo packets")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Wolfgang Walter <linux@stwm.de>
Cc: Vlad Yasevich <vyasevich@gmail.com>
---
net/ipv6/ip6_output.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 7fde1f265c90..1fe5c687328e 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1218,7 +1218,6 @@ static int __ip6_append_data(struct sock *sk,
u32 tskey = 0;
struct rt6_info *rt = (struct rt6_info *)cork->dst;
struct ipv6_txoptions *opt = v6_cork->opt;
- int csummode = CHECKSUM_NONE;
skb = skb_peek_tail(queue);
if (!skb) {
@@ -1275,14 +1274,6 @@ emsgsize:
tskey = sk->sk_tskey++;
}
- /* If this is the first and only packet and device
- * supports checksum offloading, let's use it.
- */
- if (!skb && sk->sk_protocol == IPPROTO_UDP &&
- length + fragheaderlen < mtu &&
- rt->dst.dev->features & NETIF_F_V6_CSUM &&
- !exthdrlen)
- csummode = CHECKSUM_PARTIAL;
/*
* Let's try using as much space as possible.
* Use MTU if total length of the message fits into the MTU.
@@ -1396,7 +1387,7 @@ alloc_new_skb:
* Fill in the control structures
*/
skb->protocol = htons(ETH_P_IPV6);
- skb->ip_summed = csummode;
+ skb->ip_summed = CHECKSUM_NONE;
skb->csum = 0;
/* reserve for fragmentation and ipsec header */
skb_reserve(skb, hh_len + sizeof(struct frag_hdr) +
next prev parent reply other threads:[~2015-05-08 22:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1770409.aMESoOv08f@h2o.as.studentenwerk.mhn.de>
[not found] ` <1958390.Ugr57PpLDS@h2o.as.studentenwerk.mhn.de>
2015-05-06 18:15 ` kernel >= 4.0: crashes when using traceroute6 with isatap Cong Wang
2015-05-06 19:10 ` Eric Dumazet
2015-05-06 22:04 ` Wolfgang Walter
2015-05-06 22:42 ` Eric Dumazet
2015-05-07 0:04 ` Wolfgang Walter
2015-05-12 16:34 ` Vlad Yasevich
2015-05-06 22:11 ` Wolfgang Walter
2015-05-12 20:18 ` Vlad Yasevich
2015-05-12 20:36 ` Eric Dumazet
2015-05-12 20:46 ` Vlad Yasevich
2015-05-14 0:32 ` Wolfgang Walter
[not found] ` <1431002384.22756.0.camel@edumazet-glaptop2.roam.corp.google.com>
[not found] ` <12346713.ZyFExCo3ux@h2o.as.studentenwerk.mhn.de>
[not found] ` <2088438.42IY8hjjd5@h2o.as.studentenwerk.mhn.de>
[not found] ` <1431122268.22756.41.camel@edumazet-glaptop2.roam.corp.google.com>
2015-05-08 22:22 ` Eric Dumazet [this message]
2015-05-10 23:53 ` [PATCH net] Revert "ipv6: Allow for partial checksums on non-ufo packets" David Miller
2015-05-12 18:05 ` Vlad Yasevich
2015-05-12 19:07 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431123765.22756.51.camel@edumazet-glaptop2.roam.corp.google.com \
--to=eric.dumazet@gmail.com \
--cc=linux@stwm.de \
--cc=netdev@vger.kernel.org \
--cc=vyasevich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).