aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_tunnel.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r--net/ipv6/ip6_tunnel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 36d292180942..753d6d0860fb 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1108,7 +1108,7 @@ route_lookup:
1108 t->parms.name); 1108 t->parms.name);
1109 goto tx_err_dst_release; 1109 goto tx_err_dst_release;
1110 } 1110 }
1111 mtu = dst_mtu(dst) - psh_hlen; 1111 mtu = dst_mtu(dst) - psh_hlen - t->tun_hlen;
1112 if (encap_limit >= 0) { 1112 if (encap_limit >= 0) {
1113 max_headroom += 8; 1113 max_headroom += 8;
1114 mtu -= 8; 1114 mtu -= 8;
@@ -1117,7 +1117,7 @@ route_lookup:
1117 mtu = IPV6_MIN_MTU; 1117 mtu = IPV6_MIN_MTU;
1118 if (skb_dst(skb) && !t->parms.collect_md) 1118 if (skb_dst(skb) && !t->parms.collect_md)
1119 skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu); 1119 skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
1120 if (skb->len > mtu && !skb_is_gso(skb)) { 1120 if (skb->len - t->tun_hlen > mtu && !skb_is_gso(skb)) {
1121 *pmtu = mtu; 1121 *pmtu = mtu;
1122 err = -EMSGSIZE; 1122 err = -EMSGSIZE;
1123 goto tx_err_dst_release; 1123 goto tx_err_dst_release;