aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 4acdb63495db..3915cd883657 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -938,7 +938,6 @@ EXPORT_SYMBOL_GPL(ip6_dst_lookup);
938 * @sk: socket which provides route info 938 * @sk: socket which provides route info
939 * @fl6: flow to lookup 939 * @fl6: flow to lookup
940 * @final_dst: final destination address for ipsec lookup 940 * @final_dst: final destination address for ipsec lookup
941 * @can_sleep: we are in a sleepable context
942 * 941 *
943 * This function performs a route lookup on the given flow. 942 * This function performs a route lookup on the given flow.
944 * 943 *
@@ -946,8 +945,7 @@ EXPORT_SYMBOL_GPL(ip6_dst_lookup);
946 * error code. 945 * error code.
947 */ 946 */
948struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, 947struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
949 const struct in6_addr *final_dst, 948 const struct in6_addr *final_dst)
950 bool can_sleep)
951{ 949{
952 struct dst_entry *dst = NULL; 950 struct dst_entry *dst = NULL;
953 int err; 951 int err;
@@ -957,8 +955,6 @@ struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
957 return ERR_PTR(err); 955 return ERR_PTR(err);
958 if (final_dst) 956 if (final_dst)
959 fl6->daddr = *final_dst; 957 fl6->daddr = *final_dst;
960 if (can_sleep)
961 fl6->flowi6_flags |= FLOWI_FLAG_CAN_SLEEP;
962 958
963 return xfrm_lookup(sock_net(sk), dst, flowi6_to_flowi(fl6), sk, 0); 959 return xfrm_lookup(sock_net(sk), dst, flowi6_to_flowi(fl6), sk, 0);
964} 960}
@@ -969,7 +965,6 @@ EXPORT_SYMBOL_GPL(ip6_dst_lookup_flow);
969 * @sk: socket which provides the dst cache and route info 965 * @sk: socket which provides the dst cache and route info
970 * @fl6: flow to lookup 966 * @fl6: flow to lookup
971 * @final_dst: final destination address for ipsec lookup 967 * @final_dst: final destination address for ipsec lookup
972 * @can_sleep: we are in a sleepable context
973 * 968 *
974 * This function performs a route lookup on the given flow with the 969 * This function performs a route lookup on the given flow with the
975 * possibility of using the cached route in the socket if it is valid. 970 * possibility of using the cached route in the socket if it is valid.
@@ -980,8 +975,7 @@ EXPORT_SYMBOL_GPL(ip6_dst_lookup_flow);
980 * error code. 975 * error code.
981 */ 976 */
982struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, 977struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
983 const struct in6_addr *final_dst, 978 const struct in6_addr *final_dst)
984 bool can_sleep)
985{ 979{
986 struct dst_entry *dst = sk_dst_check(sk, inet6_sk(sk)->dst_cookie); 980 struct dst_entry *dst = sk_dst_check(sk, inet6_sk(sk)->dst_cookie);
987 int err; 981 int err;
@@ -993,8 +987,6 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
993 return ERR_PTR(err); 987 return ERR_PTR(err);
994 if (final_dst) 988 if (final_dst)
995 fl6->daddr = *final_dst; 989 fl6->daddr = *final_dst;
996 if (can_sleep)
997 fl6->flowi6_flags |= FLOWI_FLAG_CAN_SLEEP;
998 990
999 return xfrm_lookup(sock_net(sk), dst, flowi6_to_flowi(fl6), sk, 0); 991 return xfrm_lookup(sock_net(sk), dst, flowi6_to_flowi(fl6), sk, 0);
1000} 992}