mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 19:35:06 +00:00
Kernel: Add support for the MSG_DONTROUTE sys$sendmsg flag
This commit is contained in:
parent
1f16250de9
commit
5514d60d8d
5 changed files with 13 additions and 5 deletions
|
@ -210,7 +210,8 @@ ErrorOr<size_t> IPv4Socket::sendto(OpenFileDescription&, const UserOrKernelBuffe
|
|||
if (!is_connected() && m_peer_address.is_zero())
|
||||
return set_so_error(EPIPE);
|
||||
|
||||
auto routing_decision = route_to(m_peer_address, m_local_address, bound_interface());
|
||||
auto allow_using_gateway = (flags & MSG_DONTROUTE) ? AllowUsingGateway::No : AllowUsingGateway::Yes;
|
||||
auto routing_decision = route_to(m_peer_address, m_local_address, bound_interface(), allow_using_gateway);
|
||||
if (routing_decision.is_zero())
|
||||
return set_so_error(EHOSTUNREACH);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue