mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:45: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
|
@ -139,7 +139,7 @@ static MACAddress multicast_ethernet_address(IPv4Address const& address)
|
|||
return MACAddress { 0x01, 0x00, 0x5e, (u8)(address[1] & 0x7f), address[2], address[3] };
|
||||
}
|
||||
|
||||
RoutingDecision route_to(IPv4Address const& target, IPv4Address const& source, RefPtr<NetworkAdapter> const through)
|
||||
RoutingDecision route_to(IPv4Address const& target, IPv4Address const& source, RefPtr<NetworkAdapter> const through, AllowUsingGateway allow_using_gateway)
|
||||
{
|
||||
auto matches = [&](auto& adapter) {
|
||||
if (!through)
|
||||
|
@ -206,7 +206,7 @@ RoutingDecision route_to(IPv4Address const& target, IPv4Address const& source, R
|
|||
|
||||
adapter = local_adapter;
|
||||
next_hop_ip = target;
|
||||
} else if (gateway_adapter) {
|
||||
} else if (gateway_adapter && allow_using_gateway == AllowUsingGateway::Yes) {
|
||||
dbgln_if(ROUTING_DEBUG, "Routing: Got adapter for route (using gateway {}): {} ({}/{}) for {}",
|
||||
gateway_adapter->ipv4_gateway(),
|
||||
gateway_adapter->name(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue