[PATCH 4.14 67/67] Revert "ip6_vti: adjust vti mtu according to mtu of lower device"

2018-04-06 Thread Greg Kroah-Hartman
4.14-stable review patch.  If anyone has any objections, please let me know.

--

From: Greg Kroah-Hartman 

This reverts commit e6cfc525163ea3375113a9dcc234c2cdd8dbf643 which is
commit 53c81e95df1793933f87748d36070a721f6cb287 upstream.

Ben writes that there are a number of follow-on patches needed to fix
this up, but they get complex to backport, and some custom fixes are
needed, so let's just revert this and wait for a "real" set of patches
to resolve this to be submitted if it is really needed.

Reported-by: Ben Hutchings 
Cc: Petr Vorel 
Cc: Alexey Kodanev 
Cc: David S. Miller 
Cc: Stefano Brivio 
Signed-off-by: Greg Kroah-Hartman 
---
 net/ipv6/ip6_vti.c |   20 
 1 file changed, 20 deletions(-)

--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -626,7 +626,6 @@ static void vti6_link_config(struct ip6_
 {
struct net_device *dev = t->dev;
struct __ip6_tnl_parm *p = >parms;
-   struct net_device *tdev = NULL;
 
memcpy(dev->dev_addr, >laddr, sizeof(struct in6_addr));
memcpy(dev->broadcast, >raddr, sizeof(struct in6_addr));
@@ -639,25 +638,6 @@ static void vti6_link_config(struct ip6_
dev->flags |= IFF_POINTOPOINT;
else
dev->flags &= ~IFF_POINTOPOINT;
-
-   if (p->flags & IP6_TNL_F_CAP_XMIT) {
-   int strict = (ipv6_addr_type(>raddr) &
- (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL));
-   struct rt6_info *rt = rt6_lookup(t->net,
->raddr, >laddr,
-p->link, strict);
-
-   if (rt)
-   tdev = rt->dst.dev;
-   ip6_rt_put(rt);
-   }
-
-   if (!tdev && p->link)
-   tdev = __dev_get_by_index(t->net, p->link);
-
-   if (tdev)
-   dev->mtu = max_t(int, tdev->mtu - dev->hard_header_len,
-IPV6_MIN_MTU);
 }
 
 /**




[PATCH 4.14 67/67] Revert "ip6_vti: adjust vti mtu according to mtu of lower device"

2018-04-06 Thread Greg Kroah-Hartman
4.14-stable review patch.  If anyone has any objections, please let me know.

--

From: Greg Kroah-Hartman 

This reverts commit e6cfc525163ea3375113a9dcc234c2cdd8dbf643 which is
commit 53c81e95df1793933f87748d36070a721f6cb287 upstream.

Ben writes that there are a number of follow-on patches needed to fix
this up, but they get complex to backport, and some custom fixes are
needed, so let's just revert this and wait for a "real" set of patches
to resolve this to be submitted if it is really needed.

Reported-by: Ben Hutchings 
Cc: Petr Vorel 
Cc: Alexey Kodanev 
Cc: David S. Miller 
Cc: Stefano Brivio 
Signed-off-by: Greg Kroah-Hartman 
---
 net/ipv6/ip6_vti.c |   20 
 1 file changed, 20 deletions(-)

--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -626,7 +626,6 @@ static void vti6_link_config(struct ip6_
 {
struct net_device *dev = t->dev;
struct __ip6_tnl_parm *p = >parms;
-   struct net_device *tdev = NULL;
 
memcpy(dev->dev_addr, >laddr, sizeof(struct in6_addr));
memcpy(dev->broadcast, >raddr, sizeof(struct in6_addr));
@@ -639,25 +638,6 @@ static void vti6_link_config(struct ip6_
dev->flags |= IFF_POINTOPOINT;
else
dev->flags &= ~IFF_POINTOPOINT;
-
-   if (p->flags & IP6_TNL_F_CAP_XMIT) {
-   int strict = (ipv6_addr_type(>raddr) &
- (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL));
-   struct rt6_info *rt = rt6_lookup(t->net,
->raddr, >laddr,
-p->link, strict);
-
-   if (rt)
-   tdev = rt->dst.dev;
-   ip6_rt_put(rt);
-   }
-
-   if (!tdev && p->link)
-   tdev = __dev_get_by_index(t->net, p->link);
-
-   if (tdev)
-   dev->mtu = max_t(int, tdev->mtu - dev->hard_header_len,
-IPV6_MIN_MTU);
 }
 
 /**