diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2013-08-28 02:04:14 -0400 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2013-12-06 01:24:39 -0500 |
commit | 0e0d44ab4275549998567cd4700b43f7496eb62b (patch) | |
tree | 2b508851d3c8c76f7068c519e0b5c8ad31d21eec /net/ipv6 | |
parent | 5b8ef3415a21f173ab115e90ec92c071a03f22d7 (diff) |
net: Remove FLOWI_FLAG_CAN_SLEEP
FLOWI_FLAG_CAN_SLEEP was used to notify xfrm about the posibility
to sleep until the needed states are resolved. This code is gone,
so FLOWI_FLAG_CAN_SLEEP is not needed anymore.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/af_inet6.c | 2 | ||||
-rw-r--r-- | net/ipv6/datagram.c | 2 | ||||
-rw-r--r-- | net/ipv6/inet6_connection_sock.c | 4 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 12 | ||||
-rw-r--r-- | net/ipv6/ping.c | 2 | ||||
-rw-r--r-- | net/ipv6/raw.c | 2 | ||||
-rw-r--r-- | net/ipv6/syncookies.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 4 | ||||
-rw-r--r-- | net/ipv6/udp.c | 2 |
9 files changed, 12 insertions, 20 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 4fbdb7046d28..c33f98a4cf72 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -661,7 +661,7 @@ int inet6_sk_rebuild_header(struct sock *sk) | |||
661 | 661 | ||
662 | final_p = fl6_update_dst(&fl6, np->opt, &final); | 662 | final_p = fl6_update_dst(&fl6, np->opt, &final); |
663 | 663 | ||
664 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); | 664 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p); |
665 | if (IS_ERR(dst)) { | 665 | if (IS_ERR(dst)) { |
666 | sk->sk_route_caps = 0; | 666 | sk->sk_route_caps = 0; |
667 | sk->sk_err_soft = -PTR_ERR(dst); | 667 | sk->sk_err_soft = -PTR_ERR(dst); |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 8dfe1f4d3c1a..d7ef682cd984 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -171,7 +171,7 @@ ipv4_connected: | |||
171 | opt = flowlabel ? flowlabel->opt : np->opt; | 171 | opt = flowlabel ? flowlabel->opt : np->opt; |
172 | final_p = fl6_update_dst(&fl6, opt, &final); | 172 | final_p = fl6_update_dst(&fl6, opt, &final); |
173 | 173 | ||
174 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, true); | 174 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p); |
175 | err = 0; | 175 | err = 0; |
176 | if (IS_ERR(dst)) { | 176 | if (IS_ERR(dst)) { |
177 | err = PTR_ERR(dst); | 177 | err = PTR_ERR(dst); |
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 77bb8afb141d..c9138189415a 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
@@ -86,7 +86,7 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk, | |||
86 | fl6->fl6_sport = htons(ireq->ir_num); | 86 | fl6->fl6_sport = htons(ireq->ir_num); |
87 | security_req_classify_flow(req, flowi6_to_flowi(fl6)); | 87 | security_req_classify_flow(req, flowi6_to_flowi(fl6)); |
88 | 88 | ||
89 | dst = ip6_dst_lookup_flow(sk, fl6, final_p, false); | 89 | dst = ip6_dst_lookup_flow(sk, fl6, final_p); |
90 | if (IS_ERR(dst)) | 90 | if (IS_ERR(dst)) |
91 | return NULL; | 91 | return NULL; |
92 | 92 | ||
@@ -216,7 +216,7 @@ static struct dst_entry *inet6_csk_route_socket(struct sock *sk, | |||
216 | 216 | ||
217 | dst = __inet6_csk_dst_check(sk, np->dst_cookie); | 217 | dst = __inet6_csk_dst_check(sk, np->dst_cookie); |
218 | if (!dst) { | 218 | if (!dst) { |
219 | dst = ip6_dst_lookup_flow(sk, fl6, final_p, false); | 219 | dst = ip6_dst_lookup_flow(sk, fl6, final_p); |
220 | 220 | ||
221 | if (!IS_ERR(dst)) | 221 | if (!IS_ERR(dst)) |
222 | __inet6_csk_dst_store(sk, dst, NULL, NULL); | 222 | __inet6_csk_dst_store(sk, dst, NULL, NULL); |
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 | */ |
948 | struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, | 947 | struct 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 | */ |
982 | struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, | 977 | struct 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 | } |
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index a83243c3d656..15d23b8c2129 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c | |||
@@ -145,7 +145,7 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
145 | else if (!fl6.flowi6_oif) | 145 | else if (!fl6.flowi6_oif) |
146 | fl6.flowi6_oif = np->ucast_oif; | 146 | fl6.flowi6_oif = np->ucast_oif; |
147 | 147 | ||
148 | dst = ip6_sk_dst_lookup_flow(sk, &fl6, daddr, 1); | 148 | dst = ip6_sk_dst_lookup_flow(sk, &fl6, daddr); |
149 | if (IS_ERR(dst)) | 149 | if (IS_ERR(dst)) |
150 | return PTR_ERR(dst); | 150 | return PTR_ERR(dst); |
151 | rt = (struct rt6_info *) dst; | 151 | rt = (struct rt6_info *) dst; |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 7fb4e14c467f..4945fb6d60a2 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -865,7 +865,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
865 | fl6.flowi6_oif = np->ucast_oif; | 865 | fl6.flowi6_oif = np->ucast_oif; |
866 | security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); | 866 | security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); |
867 | 867 | ||
868 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, true); | 868 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p); |
869 | if (IS_ERR(dst)) { | 869 | if (IS_ERR(dst)) { |
870 | err = PTR_ERR(dst); | 870 | err = PTR_ERR(dst); |
871 | goto out; | 871 | goto out; |
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index 535a3ad262f1..bb53a5e73c1a 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -247,7 +247,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
247 | fl6.fl6_sport = inet_sk(sk)->inet_sport; | 247 | fl6.fl6_sport = inet_sk(sk)->inet_sport; |
248 | security_req_classify_flow(req, flowi6_to_flowi(&fl6)); | 248 | security_req_classify_flow(req, flowi6_to_flowi(&fl6)); |
249 | 249 | ||
250 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); | 250 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p); |
251 | if (IS_ERR(dst)) | 251 | if (IS_ERR(dst)) |
252 | goto out_free; | 252 | goto out_free; |
253 | } | 253 | } |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 0740f93a114a..f14456f40d02 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -258,7 +258,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
258 | 258 | ||
259 | security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); | 259 | security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); |
260 | 260 | ||
261 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, true); | 261 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p); |
262 | if (IS_ERR(dst)) { | 262 | if (IS_ERR(dst)) { |
263 | err = PTR_ERR(dst); | 263 | err = PTR_ERR(dst); |
264 | goto failure; | 264 | goto failure; |
@@ -801,7 +801,7 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, | |||
801 | * Underlying function will use this to retrieve the network | 801 | * Underlying function will use this to retrieve the network |
802 | * namespace | 802 | * namespace |
803 | */ | 803 | */ |
804 | dst = ip6_dst_lookup_flow(ctl_sk, &fl6, NULL, false); | 804 | dst = ip6_dst_lookup_flow(ctl_sk, &fl6, NULL); |
805 | if (!IS_ERR(dst)) { | 805 | if (!IS_ERR(dst)) { |
806 | skb_dst_set(buff, dst); | 806 | skb_dst_set(buff, dst); |
807 | ip6_xmit(ctl_sk, buff, &fl6, NULL, tclass); | 807 | ip6_xmit(ctl_sk, buff, &fl6, NULL, tclass); |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index bcd5699313c3..ec3eb7f3f87c 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -1221,7 +1221,7 @@ do_udp_sendmsg: | |||
1221 | 1221 | ||
1222 | security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); | 1222 | security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); |
1223 | 1223 | ||
1224 | dst = ip6_sk_dst_lookup_flow(sk, &fl6, final_p, true); | 1224 | dst = ip6_sk_dst_lookup_flow(sk, &fl6, final_p); |
1225 | if (IS_ERR(dst)) { | 1225 | if (IS_ERR(dst)) { |
1226 | err = PTR_ERR(dst); | 1226 | err = PTR_ERR(dst); |
1227 | dst = NULL; | 1227 | dst = NULL; |