summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-01 14:27:04 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-01 14:27:04 -0800
commit273447b352e69c327efdecfd6e1d6fe3edbdcd14 (patch)
treedae1e0778ca973c25b74fd3dc9728616d6e65b73 /net/ipv4
parent5df65e5567a497a28067019b8ff08f98fb026629 (diff)
downloadop-kernel-dev-273447b352e69c327efdecfd6e1d6fe3edbdcd14.zip
op-kernel-dev-273447b352e69c327efdecfd6e1d6fe3edbdcd14.tar.gz
ipv4: Kill can_sleep arg to ip_route_output_flow()
This boolean state is now available in the flow flags. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/af_inet.c2
-rw-r--r--net/ipv4/inet_connection_sock.c2
-rw-r--r--net/ipv4/ip_output.c2
-rw-r--r--net/ipv4/raw.c2
-rw-r--r--net/ipv4/route.c7
-rw-r--r--net/ipv4/udp.c2
6 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 7d90fe0..44513bb 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1174,7 +1174,7 @@ int inet_sk_rebuild_header(struct sock *sk)
};
security_sk_classify_flow(sk, &fl);
- err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk, false);
+ err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk);
}
if (!err)
sk_setup_caps(sk, &rt->dst);
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 0caeb69..7f85d4a 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -369,7 +369,7 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
struct net *net = sock_net(sk);
security_req_classify_flow(req, &fl);
- if (ip_route_output_flow(net, &rt, &fl, sk, false))
+ if (ip_route_output_flow(net, &rt, &fl, sk))
goto no_route;
if (opt && opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
goto route_err;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index e6905c5..68dbe2d 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -355,7 +355,7 @@ int ip_queue_xmit(struct sk_buff *skb)
* itself out.
*/
security_sk_classify_flow(sk, &fl);
- if (ip_route_output_flow(sock_net(sk), &rt, &fl, sk, false))
+ if (ip_route_output_flow(sock_net(sk), &rt, &fl, sk))
goto no_route;
}
sk_setup_caps(sk, &rt->dst);
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index e8e8613..d7a2d1e 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -564,7 +564,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
}
security_sk_classify_flow(sk, &fl);
- err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk, true);
+ err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk);
}
if (err)
goto done;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 1ac3eca..7846265 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2720,7 +2720,7 @@ static int ipv4_dst_blackhole(struct net *net, struct rtable **rp, struct flowi
}
int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp,
- struct sock *sk, bool can_sleep)
+ struct sock *sk)
{
int err;
@@ -2733,7 +2733,8 @@ int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp,
if (!flp->fl4_dst)
flp->fl4_dst = (*rp)->rt_dst;
err = __xfrm_lookup(net, (struct dst_entry **)rp, flp, sk,
- can_sleep ? XFRM_LOOKUP_WAIT : 0);
+ ((flp->flags & FLOWI_FLAG_CAN_SLEEP) ?
+ XFRM_LOOKUP_WAIT : 0));
if (err == -EREMOTE)
err = ipv4_dst_blackhole(net, rp, flp);
@@ -2746,7 +2747,7 @@ EXPORT_SYMBOL_GPL(ip_route_output_flow);
int ip_route_output_key(struct net *net, struct rtable **rp, struct flowi *flp)
{
- return ip_route_output_flow(net, rp, flp, NULL, false);
+ return ip_route_output_flow(net, rp, flp, NULL);
}
EXPORT_SYMBOL(ip_route_output_key);
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index c6bcc93..ed9a5b7 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -922,7 +922,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
struct net *net = sock_net(sk);
security_sk_classify_flow(sk, &fl);
- err = ip_route_output_flow(net, &rt, &fl, sk, true);
+ err = ip_route_output_flow(net, &rt, &fl, sk);
if (err) {
if (err == -ENETUNREACH)
IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES);
OpenPOWER on IntegriCloud