netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next] ipv6: Partial checksum only UDP packets
@ 2015-02-10 16:37 Vladislav Yasevich
  2015-02-11 22:32 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vladislav Yasevich @ 2015-02-10 16:37 UTC (permalink / raw)
  To: netdev; +Cc: sd, Vladislav Yasevich

ip6_append_data is used by other protocols and some of them can't
be partially checksummed.  Only partially checksum UDP protocol.

Fixes: 32dce968dd987a (ipv6: Allow for partial checksums on non-ufo packets)
Reported-by: Sabrina Dubroca <sd@queasysnail.net>
Tested-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
v2:  added tested-by tag and fixed compile issue with prior patch.

 net/ipv6/ip6_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index d33df4c..7deebf1 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1273,7 +1273,7 @@ emsgsize:
 	/* If this is the first and only packet and device
 	 * supports checksum offloading, let's use it.
 	 */
-	if (!skb &&
+	if (!skb && sk->sk_protocol == IPPROTO_UDP &&
 	    length + fragheaderlen < mtu &&
 	    rt->dst.dev->features & NETIF_F_V6_CSUM &&
 	    !exthdrlen)
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 net-next] ipv6: Partial checksum only UDP packets
  2015-02-10 16:37 [PATCH v2 net-next] ipv6: Partial checksum only UDP packets Vladislav Yasevich
@ 2015-02-11 22:32 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-02-11 22:32 UTC (permalink / raw)
  To: vyasevich; +Cc: netdev, sd, vyasevic

From: Vladislav Yasevich <vyasevich@gmail.com>
Date: Tue, 10 Feb 2015 11:37:29 -0500

> ip6_append_data is used by other protocols and some of them can't
> be partially checksummed.  Only partially checksum UDP protocol.
> 
> Fixes: 32dce968dd987a (ipv6: Allow for partial checksums on non-ufo packets)
> Reported-by: Sabrina Dubroca <sd@queasysnail.net>
> Tested-by: Sabrina Dubroca <sd@queasysnail.net>
> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
> ---
> v2:  added tested-by tag and fixed compile issue with prior patch.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-11 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 16:37 [PATCH v2 net-next] ipv6: Partial checksum only UDP packets Vladislav Yasevich
2015-02-11 22:32 ` David Miller

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).