aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/ip6_gre.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-09-24 22:45:01 -0700
committerAlex Shi <alex.shi@linaro.org>2017-09-24 22:45:01 -0700
commit1cfb9d628fa24c0a8b24cd604ae62dfa10a0d716 (patch)
tree4e57e7465ce5fbc2a6cc838fd78e5e8a2b9799ff /net/ipv6/ip6_gre.c
parentd595150285cf886cf2399fd74b0eeb43b444c706 (diff)
parent7ecc9777c5c76d7b31c376ffd4f59c4a85472a1b (diff)
Merge branch 'linux-linaro-lsk-v4.9' into v4.9/topic/ionv4.9/topic/ion
Diffstat (limited to 'net/ipv6/ip6_gre.c')
-rw-r--r--net/ipv6/ip6_gre.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index d2844ee469cb..f78afe43bdff 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -432,7 +432,9 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
}
break;
case ICMPV6_PKT_TOOBIG:
- mtu = be32_to_cpu(info) - offset;
+ mtu = be32_to_cpu(info) - offset - t->tun_hlen;
+ if (t->dev->type == ARPHRD_ETHER)
+ mtu -= ETH_HLEN;
if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
t->dev->mtu = mtu;