Commit 5daaf152 authored by Jesse Gross's avatar Jesse Gross Committed by Luis Henriques

ipip: Properly mark ipip GRO packets as encapsulated.

BugLink: http://bugs.launchpad.net/bugs/1638267

commit b8cba75b upstream.

ipip encapsulated packets can be merged together by GRO but the result
does not have the proper GSO type set or even marked as being
encapsulated at all. Later retransmission of these packets will likely
fail if the device does not support ipip offloads. This is similar to
the issue resolved in IPv6 sit in feec0cb3
("ipv6: gro: support sit protocol").
Reported-by: default avatarPatrick Boutilier <boutilpj@ednet.ns.ca>
Fixes: 9667e9bb ("ipip: Add gro callbacks to ipip offload")
Tested-by: default avatarPatrick Boutilier <boutilpj@ednet.ns.ca>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarJesse Gross <jesse@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJuerg Haefliger <juerg.haefliger@hpe.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>

Conflicts:
	net/ipv4/af_inet.c
parent a665e1b4
......@@ -1438,6 +1438,13 @@ static int inet_gro_complete(struct sk_buff *skb, int nhoff)
return err;
}
static int ipip_gro_complete(struct sk_buff *skb, int nhoff)
{
skb->encapsulation = 1;
skb_shinfo(skb)->gso_type |= SKB_GSO_IPIP;
return inet_gro_complete(skb, nhoff);
}
int inet_ctl_sock_create(struct sock **sk, unsigned short family,
unsigned short type, unsigned char protocol,
struct net *net)
......@@ -1666,7 +1673,7 @@ static const struct net_offload ipip_offload = {
.callbacks = {
.gso_segment = inet_gso_segment,
.gro_receive = ipip_gro_receive,
.gro_complete = inet_gro_complete,
.gro_complete = ipip_gro_complete,
},
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment