This boolean state is now available in the flow flags.
Signed-off-by: David S. Miller <davem@davemloft.net>
}
};
- if (ip_route_output_flow(&init_net, &rt, &fl, NULL, false))
+ if (ip_route_output_flow(&init_net, &rt, &fl, NULL))
return NULL;
return rt;
}
}
};
- if (ip_route_output_flow(&init_net, &rt, &fl, NULL, false))
+ if (ip_route_output_flow(&init_net, &rt, &fl, NULL))
return NULL;
return rt;
}
}
};
- if (ip_route_output_flow(&init_net, &rt, &fl, NULL, false))
+ if (ip_route_output_flow(&init_net, &rt, &fl, NULL))
return NULL;
return rt;
extern void rt_cache_flush_batch(struct net *net);
extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp);
extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp);
-extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, bool can_sleep);
+extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk);
extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src,
u8 tos, struct net_device *devin, bool noref);
*rp = NULL;
}
security_sk_classify_flow(sk, &fl);
- return ip_route_output_flow(net, rp, &fl, sk, can_sleep);
+ return ip_route_output_flow(net, rp, &fl, sk);
}
static inline int ip_route_newports(struct rtable **rp, u8 protocol,
ip_rt_put(*rp);
*rp = NULL;
security_sk_classify_flow(sk, &fl);
- return ip_route_output_flow(sock_net(sk), rp, &fl, sk, false);
+ return ip_route_output_flow(sock_net(sk), rp, &fl, sk);
}
return 0;
}
};
security_skb_classify_flow(skb, &fl);
- if (ip_route_output_flow(net, &rt, &fl, sk, false)) {
+ if (ip_route_output_flow(net, &rt, &fl, sk)) {
IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES);
return NULL;
}
};
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);
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;
* 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);
}
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;
}
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;
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);
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);
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);
* 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);