Skip to content

Commit

Permalink
[IPV6]: Don't redo xfrm_lookup for cached dst entries
Browse files Browse the repository at this point in the history
The xfrm lookup is already done when the dst entry is looked up first and
stored in the cache.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Sep 8, 2005
1 parent baed16a commit a57ebc9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a57ebc9

Please sign in to comment.