Since that's what the current vague "flags" thing means.
Signed-off-by: David S. Miller <davem@davemloft.net>
static inline int ip_route_connect(struct rtable **rp, __be32 dst,
__be32 src, u32 tos, int oif, u8 protocol,
__be16 sport, __be16 dport, struct sock *sk,
- int flags)
+ bool can_sleep)
{
struct flowi fl = { .oif = oif,
.mark = sk->sk_mark,
*rp = NULL;
}
security_sk_classify_flow(sk, &fl);
- return ip_route_output_flow(net, rp, &fl, sk, flags);
+ return ip_route_output_flow(net, rp, &fl, sk, can_sleep ? 1 : 0);
}
static inline int ip_route_newports(struct rtable **rp, u8 protocol,
tmp = ip_route_connect(&rt, nexthop, inet->inet_saddr,
RT_CONN_FLAGS(sk), sk->sk_bound_dev_if,
IPPROTO_DCCP,
- orig_sport, orig_dport, sk, 1);
+ orig_sport, orig_dport, sk, true);
if (tmp < 0)
return tmp;
RT_CONN_FLAGS(sk),
sk->sk_bound_dev_if,
sk->sk_protocol,
- inet->inet_sport, inet->inet_dport, sk, 0);
+ inet->inet_sport, inet->inet_dport, sk, false);
if (err)
return err;
err = ip_route_connect(&rt, usin->sin_addr.s_addr, saddr,
RT_CONN_FLAGS(sk), oif,
sk->sk_protocol,
- inet->inet_sport, usin->sin_port, sk, 1);
+ inet->inet_sport, usin->sin_port, sk, true);
if (err) {
if (err == -ENETUNREACH)
IP_INC_STATS_BH(sock_net(sk), IPSTATS_MIB_OUTNOROUTES);
tmp = ip_route_connect(&rt, nexthop, inet->inet_saddr,
RT_CONN_FLAGS(sk), sk->sk_bound_dev_if,
IPPROTO_TCP,
- orig_sport, orig_dport, sk, 1);
+ orig_sport, orig_dport, sk, true);
if (tmp < 0) {
if (tmp == -ENETUNREACH)
IP_INC_STATS_BH(sock_net(sk), IPSTATS_MIB_OUTNOROUTES);
rc = ip_route_connect(&rt, lsa->l2tp_addr.s_addr, saddr,
RT_CONN_FLAGS(sk), oif,
IPPROTO_L2TP,
- 0, 0, sk, 1);
+ 0, 0, sk, true);
if (rc) {
if (rc == -ENETUNREACH)
IP_INC_STATS_BH(&init_net, IPSTATS_MIB_OUTNOROUTES);