aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_cm.c2
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c2
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c2
-rw-r--r--include/net/route.h6
-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
12 files changed, 16 insertions, 16 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index d02dcc6e5963..c7f776c8b2b8 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -354,7 +354,7 @@ static struct rtable *find_route(struct t3cdev *dev, __be32 local_ip,
354 } 354 }
355 }; 355 };
356 356
357 if (ip_route_output_flow(&init_net, &rt, &fl, NULL, 0)) 357 if (ip_route_output_flow(&init_net, &rt, &fl, NULL, false))
358 return NULL; 358 return NULL;
359 return rt; 359 return rt;
360} 360}
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 8b00e6c46f01..5542c994338d 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -331,7 +331,7 @@ static struct rtable *find_route(struct c4iw_dev *dev, __be32 local_ip,
331 } 331 }
332 }; 332 };
333 333
334 if (ip_route_output_flow(&init_net, &rt, &fl, NULL, 0)) 334 if (ip_route_output_flow(&init_net, &rt, &fl, NULL, false))
335 return NULL; 335 return NULL;
336 return rt; 336 return rt;
337} 337}
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index d2ad3d676724..fabca75ac2f2 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -470,7 +470,7 @@ static struct rtable *find_route_ipv4(__be32 saddr, __be32 daddr,
470 } 470 }
471 }; 471 };
472 472
473 if (ip_route_output_flow(&init_net, &rt, &fl, NULL, 0)) 473 if (ip_route_output_flow(&init_net, &rt, &fl, NULL, false))
474 return NULL; 474 return NULL;
475 475
476 return rt; 476 return rt;
diff --git a/include/net/route.h b/include/net/route.h
index 5e0826d1c0e0..6de4333d6002 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -120,7 +120,7 @@ extern void rt_cache_flush(struct net *net, int how);
120extern void rt_cache_flush_batch(struct net *net); 120extern void rt_cache_flush_batch(struct net *net);
121extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp); 121extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp);
122extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp); 122extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp);
123extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); 123extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, bool can_sleep);
124 124
125extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src, 125extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src,
126 u8 tos, struct net_device *devin, bool noref); 126 u8 tos, struct net_device *devin, bool noref);
@@ -196,7 +196,7 @@ static inline int ip_route_connect(struct rtable **rp, __be32 dst,
196 *rp = NULL; 196 *rp = NULL;
197 } 197 }
198 security_sk_classify_flow(sk, &fl); 198 security_sk_classify_flow(sk, &fl);
199 return ip_route_output_flow(net, rp, &fl, sk, can_sleep ? 1 : 0); 199 return ip_route_output_flow(net, rp, &fl, sk, can_sleep);
200} 200}
201 201
202static inline int ip_route_newports(struct rtable **rp, u8 protocol, 202static inline int ip_route_newports(struct rtable **rp, u8 protocol,
@@ -220,7 +220,7 @@ static inline int ip_route_newports(struct rtable **rp, u8 protocol,
220 ip_rt_put(*rp); 220 ip_rt_put(*rp);
221 *rp = NULL; 221 *rp = NULL;
222 security_sk_classify_flow(sk, &fl); 222 security_sk_classify_flow(sk, &fl);
223 return ip_route_output_flow(sock_net(sk), rp, &fl, sk, 0); 223 return ip_route_output_flow(sock_net(sk), rp, &fl, sk, false);
224 } 224 }
225 return 0; 225 return 0;
226} 226}
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);