Fix CI lint error

This commit is contained in:
jiangjianfeng
2024-11-08 02:52:01 +00:00
committed by Tate, Hongliang Tian
parent 827c15aa03
commit 4c80367bc8
2 changed files with 6 additions and 4 deletions

View File

@ -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<E> BoundTcpSocketInner<E> {
// 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.