1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

Kernel: Use KResult a bit more in the IPv4 networking code

This commit is contained in:
Andreas Kling 2021-01-31 12:13:16 +01:00
parent b00799b9ce
commit 9984201634
7 changed files with 23 additions and 21 deletions

View file

@ -107,7 +107,9 @@ KResultOr<size_t> UDPSocket::protocol_send(const UserOrKernelBuffer& data, size_
if (!data.read(udp_packet.payload(), data_length))
return EFAULT;
routing_decision.adapter->send_ipv4(routing_decision.next_hop, peer_address(), IPv4Protocol::UDP, UserOrKernelBuffer::for_kernel_buffer(buffer), buffer_size, ttl());
auto result = routing_decision.adapter->send_ipv4(routing_decision.next_hop, peer_address(), IPv4Protocol::UDP, UserOrKernelBuffer::for_kernel_buffer(buffer), buffer_size, ttl());
if (result.is_error())
return result;
return data_length;
}