aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-01 17:19:23 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-01 17:19:23 -0500
commit420d44daa7aa1cc847e9e527f0a27a9ce61768ca (patch)
treea5aab8c6b925ba3da1079b7262f7d6c504406eb8 /net
parentabdf7e7239da270e68262728f125ea94b9b7d42d (diff)
ipv4: Make final arg to ip_route_output_flow to be boolean "can_sleep"
Since that is what the current vague "flags" argument means. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/dccp/ipv4.c2
-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.c6
-rw-r--r--net/ipv4/udp.c2
-rw-r--r--net/l2tp/l2tp_ip.c2
8 files changed, 10 insertions, 10 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 8372d5c571a0..3d4b82f6adfd 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -475,7 +475,7 @@ static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk,
475 }; 475 };
476 476
477 security_skb_classify_flow(skb, &fl); 477 security_skb_classify_flow(skb, &fl);
478 if (ip_route_output_flow(net, &rt, &fl, sk, 0)) { 478 if (ip_route_output_flow(net, &rt, &fl, sk, false)) {
479 IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES); 479 IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES);
480 return NULL; 480 return NULL;
481 } 481 }
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index d16687db9713..7d90fe0ee5a6 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)
1174 }; 1174 };
1175 1175
1176 security_sk_classify_flow(sk, &fl); 1176 security_sk_classify_flow(sk, &fl);
1177 err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk, 0); 1177 err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk, false);
1178} 1178}
1179 if (!err) 1179 if (!err)
1180 sk_setup_caps(sk, &rt->dst); 1180 sk_setup_caps(sk, &rt->dst);
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 97e5fb765265..0caeb69de4b1 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,
369 struct net *net = sock_net(sk); 369 struct net *net = sock_net(sk);
370 370
371 security_req_classify_flow(req, &fl); 371 security_req_classify_flow(req, &fl);
372 if (ip_route_output_flow(net, &rt, &fl, sk, 0)) 372 if (ip_route_output_flow(net, &rt, &fl, sk, false))
373 goto no_route; 373 goto no_route;
374 if (opt && opt->is_strictroute && rt->rt_dst != rt->rt_gateway) 374 if (opt && opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
375 goto route_err; 375 goto route_err;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 460308c35028..e6905c562fb7 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)
355 * itself out. 355 * itself out.
356 */ 356 */
357 security_sk_classify_flow(sk, &fl); 357 security_sk_classify_flow(sk, &fl);
358 if (ip_route_output_flow(sock_net(sk), &rt, &fl, sk, 0)) 358 if (ip_route_output_flow(sock_net(sk), &rt, &fl, sk, false))
359 goto no_route; 359 goto no_route;
360 } 360 }
361 sk_setup_caps(sk, &rt->dst); 361 sk_setup_caps(sk, &rt->dst);
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 6390ba299b3d..e1857658964d 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -563,7 +563,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
563 } 563 }
564 564
565 security_sk_classify_flow(sk, &fl); 565 security_sk_classify_flow(sk, &fl);
566 err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk, 1); 566 err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk, true);
567 } 567 }
568 if (err) 568 if (err)
569 goto done; 569 goto done;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 52b077d45208..1ac3ecaf36e8 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
2720} 2720}
2721 2721
2722int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp, 2722int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp,
2723 struct sock *sk, int flags) 2723 struct sock *sk, bool can_sleep)
2724{ 2724{
2725 int err; 2725 int err;
2726 2726
@@ -2733,7 +2733,7 @@ int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp,
2733 if (!flp->fl4_dst) 2733 if (!flp->fl4_dst)
2734 flp->fl4_dst = (*rp)->rt_dst; 2734 flp->fl4_dst = (*rp)->rt_dst;
2735 err = __xfrm_lookup(net, (struct dst_entry **)rp, flp, sk, 2735 err = __xfrm_lookup(net, (struct dst_entry **)rp, flp, sk,
2736 flags ? XFRM_LOOKUP_WAIT : 0); 2736 can_sleep ? XFRM_LOOKUP_WAIT : 0);
2737 if (err == -EREMOTE) 2737 if (err == -EREMOTE)
2738 err = ipv4_dst_blackhole(net, rp, flp); 2738 err = ipv4_dst_blackhole(net, rp, flp);
2739 2739
@@ -2746,7 +2746,7 @@ EXPORT_SYMBOL_GPL(ip_route_output_flow);
2746 2746
2747int ip_route_output_key(struct net *net, struct rtable **rp, struct flowi *flp) 2747int ip_route_output_key(struct net *net, struct rtable **rp, struct flowi *flp)
2748{ 2748{
2749 return ip_route_output_flow(net, rp, flp, NULL, 0); 2749 return ip_route_output_flow(net, rp, flp, NULL, false);
2750} 2750}
2751EXPORT_SYMBOL(ip_route_output_key); 2751EXPORT_SYMBOL(ip_route_output_key);
2752 2752
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 8155d6eda376..790187b5c308 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -920,7 +920,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
920 struct net *net = sock_net(sk); 920 struct net *net = sock_net(sk);
921 921
922 security_sk_classify_flow(sk, &fl); 922 security_sk_classify_flow(sk, &fl);
923 err = ip_route_output_flow(net, &rt, &fl, sk, 1); 923 err = ip_route_output_flow(net, &rt, &fl, sk, true);
924 if (err) { 924 if (err) {
925 if (err == -ENETUNREACH) 925 if (err == -ENETUNREACH)
926 IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES); 926 IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES);
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index 28e876a6b1dd..7744a8e4b4c6 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -489,7 +489,7 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m
489 * itself out. 489 * itself out.
490 */ 490 */
491 security_sk_classify_flow(sk, &fl); 491 security_sk_classify_flow(sk, &fl);
492 if (ip_route_output_flow(sock_net(sk), &rt, &fl, sk, 0)) 492 if (ip_route_output_flow(sock_net(sk), &rt, &fl, sk, false))
493 goto no_route; 493 goto no_route;
494 } 494 }
495 sk_setup_caps(sk, &rt->dst); 495 sk_setup_caps(sk, &rt->dst);