mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-23 08:06:11 +00:00
Kernel: Avoid deadlock when trying to send packets from the NetworkTask
fixes #6758
This commit is contained in:
committed by
Andreas Kling
parent
4d697855ea
commit
d8f92bdf96
@@ -197,7 +197,8 @@ KResult TCPSocket::send_tcp_packet(u16 flags, const UserOrKernelBuffer* payload,
|
||||
}
|
||||
|
||||
auto routing_decision = route_to(peer_address(), local_address(), bound_interface());
|
||||
VERIFY(!routing_decision.is_zero());
|
||||
if (routing_decision.is_zero())
|
||||
return EHOSTUNREACH;
|
||||
|
||||
auto packet_buffer = UserOrKernelBuffer::for_kernel_buffer(buffer.data());
|
||||
auto result = routing_decision.adapter->send_ipv4(
|
||||
@@ -214,7 +215,8 @@ KResult TCPSocket::send_tcp_packet(u16 flags, const UserOrKernelBuffer* payload,
|
||||
void TCPSocket::send_outgoing_packets()
|
||||
{
|
||||
auto routing_decision = route_to(peer_address(), local_address(), bound_interface());
|
||||
VERIFY(!routing_decision.is_zero());
|
||||
if (routing_decision.is_zero())
|
||||
return;
|
||||
|
||||
auto now = kgettimeofday();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user