summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-02 13:27:41 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-02 13:27:41 -0800
commit452edd598f60522c11f7f88fdbab27eb36509d1a (patch)
treedf1510e9848e591a412c8bfa724253470c48c4c2 /net/ipv4/route.c
parent3872b284087081ee5cb0e4630954c2f7a2153cf5 (diff)
downloadlinux-452edd598f60522c11f7f88fdbab27eb36509d1a.tar.bz2
xfrm: Return dst directly from xfrm_lookup()
Instead of on the stack. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index e24e4cf2a112..63d37004ee66 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -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;