IPv4: Randomize the first TCP sequence number

Fixes #185.
This commit is contained in:
Andreas Kling 2020-01-08 16:03:01 +01:00
parent 03c34cc73f
commit aac17fc81a
Notes: sideshowbarker 2024-07-19 10:15:36 +09:00

View File

@ -331,7 +331,7 @@ KResult TCPSocket::protocol_connect(FileDescription& description, ShouldBlock sh
allocate_local_port_if_needed();
m_sequence_number = 0;
m_sequence_number = get_good_random<u32>();
m_ack_number = 0;
set_setup_state(SetupState::InProgress);