mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
net/tunnel: set inner protocol in network gro hooks
am: b07eed8f71
Change-Id: Ie756dda34329d2c49e000e881c141449bcf0f3c1
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user