Browse Source

IPv4: Randomize the first TCP sequence number

Fixes #185.
Andreas Kling 5 years ago
parent
commit
aac17fc81a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Kernel/Net/TCPSocket.cpp

+ 1 - 1
Kernel/Net/TCPSocket.cpp

@@ -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);