diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-02 13:27:41 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-02 13:27:41 -0800 |
commit | 452edd598f60522c11f7f88fdbab27eb36509d1a (patch) | |
tree | df1510e9848e591a412c8bfa724253470c48c4c2 /net/ipv4/route.c | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6 (diff) | |
download | linux-dev-452edd598f60522c11f7f88fdbab27eb36509d1a.tar.xz linux-dev-452edd598f60522c11f7f88fdbab27eb36509d1a.zip |
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.c | 7 |
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; |