aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/ip6_gre.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index fb595e8dc15b..59c121b932ac 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -503,8 +503,8 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
503 __u32 *pmtu, __be16 proto) 503 __u32 *pmtu, __be16 proto)
504{ 504{
505 struct ip6_tnl *tunnel = netdev_priv(dev); 505 struct ip6_tnl *tunnel = netdev_priv(dev);
506 __be16 protocol = (dev->type == ARPHRD_ETHER) ? 506 struct dst_entry *dst = skb_dst(skb);
507 htons(ETH_P_TEB) : proto; 507 __be16 protocol;
508 508
509 if (dev->type == ARPHRD_ETHER) 509 if (dev->type == ARPHRD_ETHER)
510 IPCB(skb)->flags = 0; 510 IPCB(skb)->flags = 0;
@@ -518,9 +518,14 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
518 tunnel->o_seqno++; 518 tunnel->o_seqno++;
519 519
520 /* Push GRE header. */ 520 /* Push GRE header. */
521 protocol = (dev->type == ARPHRD_ETHER) ? htons(ETH_P_TEB) : proto;
521 gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags, 522 gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags,
522 protocol, tunnel->parms.o_key, htonl(tunnel->o_seqno)); 523 protocol, tunnel->parms.o_key, htonl(tunnel->o_seqno));
523 524
525 /* TooBig packet may have updated dst->dev's mtu */
526 if (dst && dst_mtu(dst) > dst->dev->mtu)
527 dst->ops->update_pmtu(dst, NULL, skb, dst->dev->mtu);
528
524 return ip6_tnl_xmit(skb, dev, dsfield, fl6, encap_limit, pmtu, 529 return ip6_tnl_xmit(skb, dev, dsfield, fl6, encap_limit, pmtu,
525 NEXTHDR_GRE); 530 NEXTHDR_GRE);
526} 531}