Procházet zdrojové kódy

Fix TCP incoming sequence number check.

whitequark před 8 roky
rodič
revize
9bcf4acda9
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      src/socket/tcp.rs

+ 2 - 3
src/socket/tcp.rs

@@ -399,9 +399,8 @@ impl<'a> TcpSocket<'a> {
             (State::SynSent, _) => (),
             // In all other states, segments must occupy a valid portion of the receive window.
             // For now, do not try to reassemble out-of-order segments.
-            (_, TcpRepr { control, seq_number, .. }) => {
-                let next_remote_seq = self.remote_seq_no + self.rx_buffer.len() as i32 +
-                                      control.len();
+            (_, TcpRepr { seq_number, .. }) => {
+                let next_remote_seq = self.remote_seq_no + self.rx_buffer.len() as i32;
                 if seq_number - next_remote_seq > 0 {
                     net_trace!("tcp:{}:{}: unacceptable SEQ ({} not in {}..)",
                                self.local_endpoint, self.remote_endpoint,