aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-02 16:27:41 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-02 16:27:41 -0500
commit452edd598f60522c11f7f88fdbab27eb36509d1a (patch)
treedf1510e9848e591a412c8bfa724253470c48c4c2 /net/ipv6/ip6_output.c
parent3872b284087081ee5cb0e4630954c2f7a2153cf5 (diff)
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,
1028 if (can_sleep) 1028 if (can_sleep)
1029 fl->flags |= FLOWI_FLAG_CAN_SLEEP; 1029 fl->flags |= FLOWI_FLAG_CAN_SLEEP;
1030 1030
1031 err = xfrm_lookup(sock_net(sk), &dst, fl, sk, 0); 1031 return xfrm_lookup(sock_net(sk), dst, fl, sk, 0);
1032 if (err)
1033 return ERR_PTR(err);
1034 return dst;
1035} 1032}
1036EXPORT_SYMBOL_GPL(ip6_dst_lookup_flow); 1033EXPORT_SYMBOL_GPL(ip6_dst_lookup_flow);
1037 1034
@@ -1067,10 +1064,7 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi *fl,
1067 if (can_sleep) 1064 if (can_sleep)
1068 fl->flags |= FLOWI_FLAG_CAN_SLEEP; 1065 fl->flags |= FLOWI_FLAG_CAN_SLEEP;
1069 1066
1070 err = xfrm_lookup(sock_net(sk), &dst, fl, sk, 0); 1067 return xfrm_lookup(sock_net(sk), dst, fl, sk, 0);
1071 if (err)
1072 return ERR_PTR(err);
1073 return dst;
1074} 1068}
1075EXPORT_SYMBOL_GPL(ip6_sk_dst_lookup_flow); 1069EXPORT_SYMBOL_GPL(ip6_sk_dst_lookup_flow);
1076 1070