Skip to content

Commit

Permalink
Fix CI lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenJiang1110 authored and tatetian committed Nov 8, 2024
1 parent 827c15a commit 4c80367
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions kernel/libs/aster-bigtcp/src/socket/bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4c80367

Please sign in to comment.