mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Fix bug in TCP state handling in SynSent
When receiving SYN while in SynSent, we now reply with SYN|ACK in addition to the SynSent->SynReceived transition.
This commit is contained in:
parent
cda56f8049
commit
8964f754f5
Notes:
sideshowbarker
2024-07-17 19:40:31 +09:00
Author: https://github.com/jamierocks Commit: https://github.com/SerenityOS/serenity/commit/8964f754f55 Pull-request: https://github.com/SerenityOS/serenity/pull/12329
1 changed files with 1 additions and 1 deletions
|
@ -472,7 +472,7 @@ void handle_tcp(IPv4Packet const& ipv4_packet, Time const& packet_timestamp)
|
|||
switch (tcp_packet.flags()) {
|
||||
case TCPFlags::SYN:
|
||||
socket->set_ack_number(tcp_packet.sequence_number() + payload_size + 1);
|
||||
(void)socket->send_ack(true);
|
||||
(void)socket->send_tcp_packet(TCPFlags::SYN | TCPFlags::ACK);
|
||||
socket->set_state(TCPSocket::State::SynReceived);
|
||||
return;
|
||||
case TCPFlags::ACK | TCPFlags::SYN:
|
||||
|
|
Loading…
Reference in a new issue