xfrm: Return dst directly from xfrm_lookup()

Instead of on the stack.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2011-03-02 13:27:41 -08:00
parent 3872b28408
commit 452edd598f
14 changed files with 111 additions and 89 deletions

View File

@@ -2730,7 +2730,12 @@ int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp,
flp->fl4_src = (*rp)->rt_src;
if (!flp->fl4_dst)
flp->fl4_dst = (*rp)->rt_dst;
return xfrm_lookup(net, (struct dst_entry **)rp, flp, sk, 0);
*rp = (struct rtable *) xfrm_lookup(net, &(*rp)->dst, flp, sk, 0);
if (IS_ERR(*rp)) {
err = PTR_ERR(*rp);
*rp = NULL;
return err;
}
}
return 0;