From: Patrick McHardy Date: Thu, 8 Sep 2005 21:27:47 +0000 (-0700) Subject: [IPV6]: Don't redo xfrm_lookup for cached dst entries X-Git-Tag: v2.6.14-rc1~492^2~22^2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=a57ebc90f1350296edded12d33d7c278831bc3bf;p=~emulex%2Finfiniband.git [IPV6]: Don't redo xfrm_lookup for cached dst entries The xfrm lookup is already done when the dst entry is looked up first and stored in the cache. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 09613729404..cf94372d1af 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -673,11 +673,12 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) if ((dst = ip6_tnl_dst_check(t)) != NULL) dst_hold(dst); - else + else { dst = ip6_route_output(NULL, &fl); - if (dst->error || xfrm_lookup(&dst, &fl, NULL, 0) < 0) - goto tx_err_link_failure; + if (dst->error || xfrm_lookup(&dst, &fl, NULL, 0) < 0) + goto tx_err_link_failure; + } tdev = dst->dev;