diff --git a/Cargo.lock b/Cargo.lock index 26cd283f..a2726570 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1425,7 +1425,7 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smoltcp" version = "0.11.0" -source = "git+https://github.com/lrh2000/smoltcp?tag=r_2024-11-08_3e68ef4#85dfcb0518f764aff1bd3bf62d14396d3c621c03" +source = "git+https://github.com/asterinas/smoltcp?tag=r_2024-11-08_f07e5b5#b10671de8aac3694e16b8f57418aa90f2891af3b" dependencies = [ "bitflags 1.3.2", "byteorder", diff --git a/kernel/libs/aster-bigtcp/src/socket/bound.rs b/kernel/libs/aster-bigtcp/src/socket/bound.rs index 8e2d0b27..da914532 100644 --- a/kernel/libs/aster-bigtcp/src/socket/bound.rs +++ b/kernel/libs/aster-bigtcp/src/socket/bound.rs @@ -107,10 +107,12 @@ impl TcpSocket { /// Sets the TCP socket in [`TimeWait`] state as dead. /// /// See [`BoundTcpSocketInner::is_dead`] for the definition of dead TCP sockets. - /// + /// /// [`TimeWait`]: smoltcp::socket::tcp::State::TimeWait fn set_dead_timewait(&self, socket: &RawTcpSocketExt) { - debug_assert!(socket.in_background && socket.state() == smoltcp::socket::tcp::State::TimeWait); + debug_assert!( + socket.in_background && socket.state() == smoltcp::socket::tcp::State::TimeWait + ); self.is_dead.store(true, Ordering::Relaxed); } } @@ -470,7 +472,7 @@ impl BoundTcpSocketInner { // If a TimeWait socket receives a new SYN packet, Linux will select a suitable // listening socket from the socket table to respond to that SYN request. // (https://elixir.bootlin.com/linux/v6.0.9/source/net/ipv4/tcp_ipv4.c#L2137) - // Moreover, the Initial Sequence Number (ISN) will be set to prevent the TimeWait socket + // Moreover, the Initial Sequence Number (ISN) will be set to prevent the TimeWait socket // from erroneously handling packets from the new connection. // (https://elixir.bootlin.com/linux/v6.0.9/source/net/ipv4/tcp_minisocks.c#L194) // Implementing such behavior is challenging with the current smoltcp APIs.