mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
net: Add FLOWI_FLAG_CAN_SLEEP.
And set is in contexts where the route resolution can sleep. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
420d44daa7
commit
5df65e5567
5 changed files with 11 additions and 3 deletions
|
@ -1026,6 +1026,7 @@ struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi *fl,
|
|||
if (final_dst)
|
||||
ipv6_addr_copy(&fl->fl6_dst, final_dst);
|
||||
if (want_blackhole) {
|
||||
fl->flags |= FLOWI_FLAG_CAN_SLEEP;
|
||||
err = __xfrm_lookup(sock_net(sk), &dst, fl, sk, XFRM_LOOKUP_WAIT);
|
||||
if (err == -EREMOTE)
|
||||
err = ip6_dst_blackhole(sk, &dst, fl);
|
||||
|
@ -1070,6 +1071,7 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi *fl,
|
|||
if (final_dst)
|
||||
ipv6_addr_copy(&fl->fl6_dst, final_dst);
|
||||
if (want_blackhole) {
|
||||
fl->flags |= FLOWI_FLAG_CAN_SLEEP;
|
||||
err = __xfrm_lookup(sock_net(sk), &dst, fl, sk, XFRM_LOOKUP_WAIT);
|
||||
if (err == -EREMOTE)
|
||||
err = ip6_dst_blackhole(sk, &dst, fl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue