net/tunnel: set inner protocol in network gro hooks

am: b07eed8f71

Change-Id: Ie756dda34329d2c49e000e881c141449bcf0f3c1
This commit is contained in:
Paolo Abeni
2017-03-22 11:59:36 +00:00
committed by android-build-merger
2 changed files with 6 additions and 2 deletions

View File

@@ -1475,8 +1475,10 @@ int inet_gro_complete(struct sk_buff *skb, int nhoff)
int proto = iph->protocol;
int err = -ENOSYS;
if (skb->encapsulation)
if (skb->encapsulation) {
skb_set_inner_protocol(skb, cpu_to_be16(ETH_P_IP));
skb_set_inner_network_header(skb, nhoff);
}
csum_replace2(&iph->check, iph->tot_len, newlen);
iph->tot_len = newlen;

View File

@@ -294,8 +294,10 @@ static int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + nhoff);
int err = -ENOSYS;
if (skb->encapsulation)
if (skb->encapsulation) {
skb_set_inner_protocol(skb, cpu_to_be16(ETH_P_IPV6));
skb_set_inner_network_header(skb, nhoff);
}
iph->payload_len = htons(skb->len - nhoff - sizeof(*iph));