diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-12 21:48:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:57:42 -0500 |
commit | bb72845e699d3c84e5f861b51db686107a51dea5 (patch) | |
tree | a4a84343cbcc96e86c83954dc82f2a5ee0ce787d | |
parent | 7233b9f33e72ca477034ff5cf901c89efba3a5bc (diff) |
[IPSEC]: Make callers of xfrm_lookup to use XFRM_LOOKUP_WAIT
This patch converts all callers of xfrm_lookup that used an
explicit value of 1 to indiciate blocking to use the new flag
XFRM_LOOKUP_WAIT.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/dccp/ipv6.c | 2 | ||||
-rw-r--r-- | net/decnet/dn_route.c | 3 | ||||
-rw-r--r-- | net/ipv4/route.c | 3 | ||||
-rw-r--r-- | net/ipv6/datagram.c | 2 | ||||
-rw-r--r-- | net/ipv6/raw.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 2 | ||||
-rw-r--r-- | net/ipv6/udp.c | 2 |
7 files changed, 9 insertions, 7 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 87c98fb86fa8..a08e2cb11915 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -994,7 +994,7 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
994 | if (final_p) | 994 | if (final_p) |
995 | ipv6_addr_copy(&fl.fl6_dst, final_p); | 995 | ipv6_addr_copy(&fl.fl6_dst, final_p); |
996 | 996 | ||
997 | err = __xfrm_lookup(&dst, &fl, sk, 1); | 997 | err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT); |
998 | if (err < 0) { | 998 | if (err < 0) { |
999 | if (err == -EREMOTE) | 999 | if (err == -EREMOTE) |
1000 | err = ip6_dst_blackhole(sk, &dst, &fl); | 1000 | err = ip6_dst_blackhole(sk, &dst, &fl); |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 5d742f1420d9..73a13075b7ee 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -1196,7 +1196,8 @@ int dn_route_output_sock(struct dst_entry **pprt, struct flowi *fl, struct sock | |||
1196 | 1196 | ||
1197 | err = __dn_route_output_key(pprt, fl, flags & MSG_TRYHARD); | 1197 | err = __dn_route_output_key(pprt, fl, flags & MSG_TRYHARD); |
1198 | if (err == 0 && fl->proto) { | 1198 | if (err == 0 && fl->proto) { |
1199 | err = xfrm_lookup(pprt, fl, sk, !(flags & MSG_DONTWAIT)); | 1199 | err = xfrm_lookup(pprt, fl, sk, (flags & MSG_DONTWAIT) ? |
1200 | XFRM_LOOKUP_WAIT : 0); | ||
1200 | } | 1201 | } |
1201 | return err; | 1202 | return err; |
1202 | } | 1203 | } |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index b576f8cd4019..1b70ffd12615 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2536,7 +2536,8 @@ int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, | |||
2536 | flp->fl4_src = (*rp)->rt_src; | 2536 | flp->fl4_src = (*rp)->rt_src; |
2537 | if (!flp->fl4_dst) | 2537 | if (!flp->fl4_dst) |
2538 | flp->fl4_dst = (*rp)->rt_dst; | 2538 | flp->fl4_dst = (*rp)->rt_dst; |
2539 | err = __xfrm_lookup((struct dst_entry **)rp, flp, sk, flags); | 2539 | err = __xfrm_lookup((struct dst_entry **)rp, flp, sk, |
2540 | flags ? XFRM_LOOKUP_WAIT : 0); | ||
2540 | if (err == -EREMOTE) | 2541 | if (err == -EREMOTE) |
2541 | err = ipv4_dst_blackhole(rp, flp, sk); | 2542 | err = ipv4_dst_blackhole(rp, flp, sk); |
2542 | 2543 | ||
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 5d4245ab4183..f49a06aa97de 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -177,7 +177,7 @@ ipv4_connected: | |||
177 | if (final_p) | 177 | if (final_p) |
178 | ipv6_addr_copy(&fl.fl6_dst, final_p); | 178 | ipv6_addr_copy(&fl.fl6_dst, final_p); |
179 | 179 | ||
180 | if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) { | 180 | if ((err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT)) < 0) { |
181 | if (err == -EREMOTE) | 181 | if (err == -EREMOTE) |
182 | err = ip6_dst_blackhole(sk, &dst, &fl); | 182 | err = ip6_dst_blackhole(sk, &dst, &fl); |
183 | if (err < 0) | 183 | if (err < 0) |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 850b83e430bc..2663fd1323e4 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -871,7 +871,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
871 | if (final_p) | 871 | if (final_p) |
872 | ipv6_addr_copy(&fl.fl6_dst, final_p); | 872 | ipv6_addr_copy(&fl.fl6_dst, final_p); |
873 | 873 | ||
874 | if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) { | 874 | if ((err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT)) < 0) { |
875 | if (err == -EREMOTE) | 875 | if (err == -EREMOTE) |
876 | err = ip6_dst_blackhole(sk, &dst, &fl); | 876 | err = ip6_dst_blackhole(sk, &dst, &fl); |
877 | if (err < 0) | 877 | if (err < 0) |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 9544beb6d1ca..0ef99864ef8a 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -265,7 +265,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
265 | if (final_p) | 265 | if (final_p) |
266 | ipv6_addr_copy(&fl.fl6_dst, final_p); | 266 | ipv6_addr_copy(&fl.fl6_dst, final_p); |
267 | 267 | ||
268 | if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) { | 268 | if ((err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT)) < 0) { |
269 | if (err == -EREMOTE) | 269 | if (err == -EREMOTE) |
270 | err = ip6_dst_blackhole(sk, &dst, &fl); | 270 | err = ip6_dst_blackhole(sk, &dst, &fl); |
271 | if (err < 0) | 271 | if (err < 0) |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 1e3bd39f54ec..8cbdcc9602df 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -757,7 +757,7 @@ do_udp_sendmsg: | |||
757 | if (final_p) | 757 | if (final_p) |
758 | ipv6_addr_copy(&fl.fl6_dst, final_p); | 758 | ipv6_addr_copy(&fl.fl6_dst, final_p); |
759 | 759 | ||
760 | if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) { | 760 | if ((err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT)) < 0) { |
761 | if (err == -EREMOTE) | 761 | if (err == -EREMOTE) |
762 | err = ip6_dst_blackhole(sk, &dst, &fl); | 762 | err = ip6_dst_blackhole(sk, &dst, &fl); |
763 | if (err < 0) | 763 | if (err < 0) |