aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2014-03-14 02:28:08 -0400
committerSteffen Klassert <steffen.klassert@secunet.com>2014-03-14 02:28:08 -0400
commit7cf9fdb5c771c61771e4e39efe18e2dbc8c8bfa4 (patch)
treee6770128ed6fb722e4a17c7b16eb36d42194ed41 /net/ipv6
parent7c85258152d639868091c8c4bb6b5364c108f074 (diff)
vti6: Remove caching of flow informations.
Unlike ip6_tunnel, vti6 does not use the the tunnel endpoint addresses to do route and xfrm lookups. So no need to cache the flow informations. It also does not make sense to calculate the mtu based on such flow informations, so remove this too. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_vti.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index f5ba4d42b4ae..cc4a758d84c7 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -443,19 +443,10 @@ static void vti6_link_config(struct ip6_tnl *t)
443 struct dst_entry *dst; 443 struct dst_entry *dst;
444 struct net_device *dev = t->dev; 444 struct net_device *dev = t->dev;
445 struct __ip6_tnl_parm *p = &t->parms; 445 struct __ip6_tnl_parm *p = &t->parms;
446 struct flowi6 *fl6 = &t->fl.u.ip6;
447 446
448 memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr)); 447 memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr));
449 memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr)); 448 memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr));
450 449
451 /* Set up flowi template */
452 fl6->saddr = p->laddr;
453 fl6->daddr = p->raddr;
454 fl6->flowi6_oif = p->link;
455 fl6->flowi6_mark = be32_to_cpu(p->i_key);
456 fl6->flowi6_proto = p->proto;
457 fl6->flowlabel = 0;
458
459 p->flags &= ~(IP6_TNL_F_CAP_XMIT | IP6_TNL_F_CAP_RCV | 450 p->flags &= ~(IP6_TNL_F_CAP_XMIT | IP6_TNL_F_CAP_RCV |
460 IP6_TNL_F_CAP_PER_PACKET); 451 IP6_TNL_F_CAP_PER_PACKET);
461 p->flags |= ip6_tnl_get_cap(t, &p->laddr, &p->raddr); 452 p->flags |= ip6_tnl_get_cap(t, &p->laddr, &p->raddr);
@@ -466,28 +457,6 @@ static void vti6_link_config(struct ip6_tnl *t)
466 dev->flags &= ~IFF_POINTOPOINT; 457 dev->flags &= ~IFF_POINTOPOINT;
467 458
468 dev->iflink = p->link; 459 dev->iflink = p->link;
469
470 if (p->flags & IP6_TNL_F_CAP_XMIT) {
471
472 dst = ip6_route_output(dev_net(dev), NULL, fl6);
473 if (dst->error)
474 return;
475
476 dst = xfrm_lookup(dev_net(dev), dst, flowi6_to_flowi(fl6),
477 NULL, 0);
478 if (IS_ERR(dst))
479 return;
480
481 if (dst->dev) {
482 dev->hard_header_len = dst->dev->hard_header_len;
483
484 dev->mtu = dst_mtu(dst);
485
486 if (dev->mtu < IPV6_MIN_MTU)
487 dev->mtu = IPV6_MIN_MTU;
488 }
489 dst_release(dst);
490 }
491} 460}
492 461
493/** 462/**