mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
Kernel: Do not send delayed ack in response to RST/ACK
In accordance with RFC 793, if the receiver is in the SYN-SENT state it should respond to a RST by aborting the connection and immediately move to the CLOSED state. Previously the system would ACK all RST/ACKs, and the remote peer would just respond with more RST packets.
This commit is contained in:
parent
b5d9b4e7ee
commit
63a15ed19d
Notes:
sideshowbarker
2024-07-18 07:36:00 +09:00
Author: https://github.com/brapru
Commit: 63a15ed19d
Pull-request: https://github.com/SerenityOS/serenity/pull/8997
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/gunnarbeutner ✅
1 changed files with 0 additions and 2 deletions
|
@ -460,8 +460,6 @@ void handle_tcp(IPv4Packet const& ipv4_packet, Time const& packet_timestamp)
|
|||
socket->set_setup_state(Socket::SetupState::Completed);
|
||||
return;
|
||||
case TCPFlags::ACK | TCPFlags::RST:
|
||||
socket->set_ack_number(tcp_packet.sequence_number() + payload_size);
|
||||
send_delayed_tcp_ack(socket);
|
||||
socket->set_state(TCPSocket::State::Closed);
|
||||
socket->set_error(TCPSocket::Error::RSTDuringConnect);
|
||||
socket->set_setup_state(Socket::SetupState::Completed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue