stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ipv6: Set skb->protocol properly for local output" has been added to the 4.4-stable tree
@ 2016-12-09 15:53 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-12-09 15:53 UTC (permalink / raw)
  To: elicooper, davem, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ipv6: Set skb->protocol properly for local output

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ipv6-set-skb-protocol-properly-for-local-output.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From b4e479a96fc398ccf83bb1cffb4ffef8631beaf1 Mon Sep 17 00:00:00 2001
From: Eli Cooper <elicooper@gmx.com>
Date: Thu, 1 Dec 2016 10:05:11 +0800
Subject: ipv6: Set skb->protocol properly for local output

From: Eli Cooper <elicooper@gmx.com>

commit b4e479a96fc398ccf83bb1cffb4ffef8631beaf1 upstream.

When xfrm is applied to TSO/GSO packets, it follows this path:

    xfrm_output() -> xfrm_output_gso() -> skb_gso_segment()

where skb_gso_segment() relies on skb->protocol to function properly.

This patch sets skb->protocol to ETH_P_IPV6 before dst_output() is called,
fixing a bug where GSO packets sent through an ipip6 tunnel are dropped
when xfrm is involved.

Signed-off-by: Eli Cooper <elicooper@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/ipv6/output_core.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/ipv6/output_core.c
+++ b/net/ipv6/output_core.c
@@ -148,6 +148,8 @@ int __ip6_local_out(struct net *net, str
 	ipv6_hdr(skb)->payload_len = htons(len);
 	IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
 
+	skb->protocol = htons(ETH_P_IPV6);
+
 	return nf_hook(NFPROTO_IPV6, NF_INET_LOCAL_OUT,
 		       net, sk, skb, NULL, skb_dst(skb)->dev,
 		       dst_output);


Patches currently in stable-queue which might be from elicooper@gmx.com are

queue-4.4/ipv6-set-skb-protocol-properly-for-local-output.patch
queue-4.4/ipv4-set-skb-protocol-properly-for-local-output.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-09 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-09 15:53 Patch "ipv6: Set skb->protocol properly for local output" has been added to the 4.4-stable tree gregkh

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