summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-03 00:27:41 +0300
committerDavid S. Miller <davem@davemloft.net>2011-03-03 00:27:41 +0300
commit452edd598f60522c11f7f88fdbab27eb36509d1a (patch)
treedf1510e9848e591a412c8bfa724253470c48c4c2 /net/ipv6/ip6_output.c
parent3872b284087081ee5cb0e4630954c2f7a2153cf5 (diff)
downloadlinux-452edd598f60522c11f7f88fdbab27eb36509d1a.tar.xz
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/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 35a4ad90a0f5..adaffaf84555 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1028,10 +1028,7 @@ struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi *fl,
if (can_sleep)
fl->flags |= FLOWI_FLAG_CAN_SLEEP;
- err = xfrm_lookup(sock_net(sk), &dst, fl, sk, 0);
- if (err)
- return ERR_PTR(err);
- return dst;
+ return xfrm_lookup(sock_net(sk), dst, fl, sk, 0);
}
EXPORT_SYMBOL_GPL(ip6_dst_lookup_flow);
@@ -1067,10 +1064,7 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi *fl,
if (can_sleep)
fl->flags |= FLOWI_FLAG_CAN_SLEEP;
- err = xfrm_lookup(sock_net(sk), &dst, fl, sk, 0);
- if (err)
- return ERR_PTR(err);
- return dst;
+ return xfrm_lookup(sock_net(sk), dst, fl, sk, 0);
}
EXPORT_SYMBOL_GPL(ip6_sk_dst_lookup_flow);