[IPSEC]: Make callers of xfrm_lookup to use XFRM_LOOKUP_WAIT
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Dec 2007 02:48:58 +0000 (18:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:57:42 +0000 (14:57 -0800)
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>
net/dccp/ipv6.c
net/decnet/dn_route.c
net/ipv4/route.c
net/ipv6/datagram.c
net/ipv6/raw.c
net/ipv6/tcp_ipv6.c
net/ipv6/udp.c

index 87c98fb86fa89311fb33863102875f5d853a94cf..a08e2cb119157b023431c1f0d835f4ea17967298 100644 (file)
@@ -994,7 +994,7 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
        if (final_p)
                ipv6_addr_copy(&fl.fl6_dst, final_p);
 
-       err = __xfrm_lookup(&dst, &fl, sk, 1);
+       err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT);
        if (err < 0) {
                if (err == -EREMOTE)
                        err = ip6_dst_blackhole(sk, &dst, &fl);
index 5d742f1420d944ed5f83d3157e218f2f981f67ad..73a13075b7eeae0d50e9325388eb1e9853a2e522 100644 (file)
@@ -1196,7 +1196,8 @@ int dn_route_output_sock(struct dst_entry **pprt, struct flowi *fl, struct sock
 
        err = __dn_route_output_key(pprt, fl, flags & MSG_TRYHARD);
        if (err == 0 && fl->proto) {
-               err = xfrm_lookup(pprt, fl, sk, !(flags & MSG_DONTWAIT));
+               err = xfrm_lookup(pprt, fl, sk, (flags & MSG_DONTWAIT) ?
+                                               XFRM_LOOKUP_WAIT : 0);
        }
        return err;
 }
index b576f8cd4019a750b5e528633373eaca27451cc1..1b70ffd1261580008dc499ef1b286ff7ee8edd53 100644 (file)
@@ -2536,7 +2536,8 @@ int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk,
                        flp->fl4_src = (*rp)->rt_src;
                if (!flp->fl4_dst)
                        flp->fl4_dst = (*rp)->rt_dst;
-               err = __xfrm_lookup((struct dst_entry **)rp, flp, sk, flags);
+               err = __xfrm_lookup((struct dst_entry **)rp, flp, sk,
+                                   flags ? XFRM_LOOKUP_WAIT : 0);
                if (err == -EREMOTE)
                        err = ipv4_dst_blackhole(rp, flp, sk);
 
index 5d4245ab4183fa0d47b4557471ac2b09f4459b47..f49a06aa97de197710841dc013e50e7d8ba2b575 100644 (file)
@@ -177,7 +177,7 @@ ipv4_connected:
        if (final_p)
                ipv6_addr_copy(&fl.fl6_dst, final_p);
 
-       if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) {
+       if ((err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT)) < 0) {
                if (err == -EREMOTE)
                        err = ip6_dst_blackhole(sk, &dst, &fl);
                if (err < 0)
index 850b83e430bc5482bd2f66609f8c06c3e08fa773..2663fd1323e4032b4d664698a9b6676c58319d6a 100644 (file)
@@ -871,7 +871,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
        if (final_p)
                ipv6_addr_copy(&fl.fl6_dst, final_p);
 
-       if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) {
+       if ((err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT)) < 0) {
                if (err == -EREMOTE)
                        err = ip6_dst_blackhole(sk, &dst, &fl);
                if (err < 0)
index 9544beb6d1ca1abc3a04d00f2f54380b87781d2d..0ef99864ef8a00963a7b7b0aa03513762728c623 100644 (file)
@@ -265,7 +265,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
        if (final_p)
                ipv6_addr_copy(&fl.fl6_dst, final_p);
 
-       if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) {
+       if ((err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT)) < 0) {
                if (err == -EREMOTE)
                        err = ip6_dst_blackhole(sk, &dst, &fl);
                if (err < 0)
index 1e3bd39f54ecadbda99576f17e936b66864b3498..8cbdcc9602df9d089aa1e5a3051cb19512e1e633 100644 (file)
@@ -757,7 +757,7 @@ do_udp_sendmsg:
        if (final_p)
                ipv6_addr_copy(&fl.fl6_dst, final_p);
 
-       if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) {
+       if ((err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT)) < 0) {
                if (err == -EREMOTE)
                        err = ip6_dst_blackhole(sk, &dst, &fl);
                if (err < 0)