aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_gre.c
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-09-29 20:22:32 -0700
committerDavid S. Miller <davem@davemloft.net>2014-10-01 21:35:51 -0400
commit54bc9bac307861aea5abb747cb58bf0275f2175f (patch)
tree0e0deb57718c2ee62d83405a4b9b605181ee65a1 /net/ipv4/ip_gre.c
parentipip: Set inner IP protocol in ipip (diff)
downloadlinux-dev-54bc9bac307861aea5abb747cb58bf0275f2175f.tar.xz
linux-dev-54bc9bac307861aea5abb747cb58bf0275f2175f.zip
gre: Set inner protocol in v4 and v6 GRE transmit
Call skb_set_inner_protocol to set inner Ethernet protocol to protocol being encapsulation by GRE before tunnel_xmit. This is needed for GSO if UDP encapsulation (fou) is being done. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r--net/ipv4/ip_gre.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 829aff8bf723..0485ef18d254 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -241,6 +241,8 @@ static void __gre_xmit(struct sk_buff *skb, struct net_device *dev,
/* Push GRE header. */
gre_build_header(skb, &tpi, tunnel->tun_hlen);
+ skb_set_inner_protocol(skb, tpi.proto);
+
ip_tunnel_xmit(skb, dev, tnl_params, tnl_params->protocol);
}