mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
Kernel: Implement is_zero for RoutingDecision
This commit is contained in:
parent
302d521485
commit
b15a7c435f
Notes:
sideshowbarker
2024-07-19 12:26:57 +09:00
Author: https://github.com/deoxxa
Commit: b15a7c435f
Pull-request: https://github.com/SerenityOS/serenity/pull/499
Reviewed-by: https://github.com/awesomekling
5 changed files with 11 additions and 4 deletions
|
@ -64,7 +64,7 @@ int UDPSocket::protocol_receive(const KBuffer& packet_buffer, void* buffer, size
|
|||
int UDPSocket::protocol_send(const void* data, int data_length)
|
||||
{
|
||||
auto routing_decision = route_to(peer_address(), local_address());
|
||||
if (!routing_decision.adapter)
|
||||
if (routing_decision.is_zero())
|
||||
return -EHOSTUNREACH;
|
||||
auto buffer = ByteBuffer::create_zeroed(sizeof(UDPPacket) + data_length);
|
||||
auto& udp_packet = *(UDPPacket*)(buffer.pointer());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue