|
@@ -907,8 +907,13 @@ impl<'a> TcpSocket<'a> {
|
|
|
segment_in_window = false;
|
|
|
}
|
|
|
|
|
|
- if !((window_start <= segment_start && segment_start <= window_end) &&
|
|
|
- (window_start <= segment_end && segment_end <= window_end)) {
|
|
|
+ if segment_start == segment_end && segment_end == window_start - 1 {
|
|
|
+ net_debug!("{}:{}:{}: received a keep-alive or window probe packet, \
|
|
|
+ will send an ACK",
|
|
|
+ self.meta.handle, self.local_endpoint, self.remote_endpoint);
|
|
|
+ segment_in_window = false;
|
|
|
+ } else if !((window_start <= segment_start && segment_start <= window_end) &&
|
|
|
+ (window_start <= segment_end && segment_end <= window_end)) {
|
|
|
net_debug!("{}:{}:{}: segment not in receive window \
|
|
|
({}..{} not intersecting {}..{}), will send challenge ACK",
|
|
|
self.meta.handle, self.local_endpoint, self.remote_endpoint,
|
|
@@ -1166,7 +1171,7 @@ impl<'a> TcpSocket<'a> {
|
|
|
// Note that we change the transmitter state here.
|
|
|
// This is fine because smoltcp assumes that it can always transmit zero or one
|
|
|
// packets for every packet it receives.
|
|
|
- net_trace!("{}:{}:{}: acknowledging incoming segment",
|
|
|
+ net_trace!("{}:{}:{}: ACKing incoming segment",
|
|
|
self.meta.handle, self.local_endpoint, self.remote_endpoint);
|
|
|
self.remote_last_ack = Some(self.remote_seq_no + self.rx_buffer.len());
|
|
|
Ok(Some(self.ack_reply(ip_repr, &repr)))
|