diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-05-13 08:19:13 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-14 16:50:00 +0200 |
commit | 990b2d0989a209915d767852bd89b4017cdc32f2 (patch) | |
tree | ea404451b60d353ff84704f560301e9f97db323d /Kernel | |
parent | aea709de31af52ef8d29137e8700344f21bd589a (diff) | |
download | serenity-990b2d0989a209915d767852bd89b4017cdc32f2.zip |
Kernel: Don't use delayed ACKs when establishing the connection
When establishing the connection we should send ACKs right away so
as to not delay the connection process. This didn't previously
matter because we'd flush all delayed ACKs when NetworkTask waits
for incoming packets.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Net/NetworkTask.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp index 6618e7c889..774cbd6697 100644 --- a/Kernel/Net/NetworkTask.cpp +++ b/Kernel/Net/NetworkTask.cpp @@ -435,12 +435,12 @@ void handle_tcp(const IPv4Packet& ipv4_packet, const Time& packet_timestamp) switch (tcp_packet.flags()) { case TCPFlags::SYN: socket->set_ack_number(tcp_packet.sequence_number() + payload_size + 1); - send_delayed_tcp_ack(socket); + unused_rc = socket->send_ack(true); socket->set_state(TCPSocket::State::SynReceived); return; case TCPFlags::ACK | TCPFlags::SYN: socket->set_ack_number(tcp_packet.sequence_number() + payload_size + 1); - send_delayed_tcp_ack(socket); + unused_rc = socket->send_ack(true); socket->set_state(TCPSocket::State::Established); socket->set_setup_state(Socket::SetupState::Completed); socket->set_connected(true); |