diff options
Diffstat (limited to 'net/ipv6/ip6_gre.c')
| -rw-r--r-- | net/ipv6/ip6_gre.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 7bb5446b9d73..bf4a9a084de5 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c | |||
| @@ -976,6 +976,7 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu) | |||
| 976 | if (t->parms.o_flags&GRE_SEQ) | 976 | if (t->parms.o_flags&GRE_SEQ) |
| 977 | addend += 4; | 977 | addend += 4; |
| 978 | } | 978 | } |
| 979 | t->hlen = addend; | ||
| 979 | 980 | ||
| 980 | if (p->flags & IP6_TNL_F_CAP_XMIT) { | 981 | if (p->flags & IP6_TNL_F_CAP_XMIT) { |
| 981 | int strict = (ipv6_addr_type(&p->raddr) & | 982 | int strict = (ipv6_addr_type(&p->raddr) & |
| @@ -1002,8 +1003,6 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu) | |||
| 1002 | } | 1003 | } |
| 1003 | ip6_rt_put(rt); | 1004 | ip6_rt_put(rt); |
| 1004 | } | 1005 | } |
| 1005 | |||
| 1006 | t->hlen = addend; | ||
| 1007 | } | 1006 | } |
| 1008 | 1007 | ||
| 1009 | static int ip6gre_tnl_change(struct ip6_tnl *t, | 1008 | static int ip6gre_tnl_change(struct ip6_tnl *t, |
| @@ -1173,9 +1172,8 @@ done: | |||
| 1173 | 1172 | ||
| 1174 | static int ip6gre_tunnel_change_mtu(struct net_device *dev, int new_mtu) | 1173 | static int ip6gre_tunnel_change_mtu(struct net_device *dev, int new_mtu) |
| 1175 | { | 1174 | { |
| 1176 | struct ip6_tnl *tunnel = netdev_priv(dev); | ||
| 1177 | if (new_mtu < 68 || | 1175 | if (new_mtu < 68 || |
| 1178 | new_mtu > 0xFFF8 - dev->hard_header_len - tunnel->hlen) | 1176 | new_mtu > 0xFFF8 - dev->hard_header_len) |
| 1179 | return -EINVAL; | 1177 | return -EINVAL; |
| 1180 | dev->mtu = new_mtu; | 1178 | dev->mtu = new_mtu; |
| 1181 | return 0; | 1179 | return 0; |
