tcp: do not abort socket when receiving invalid packets.

This matches the Linux behavior.
master
Dario Nieuwenhuis 2021-10-06 02:36:23 +02:00
parent 1f25a986c7
commit 3af5386bc5
1 changed files with 1 additions and 2 deletions

View File

@ -1361,7 +1361,6 @@ impl<'a> TcpSocket<'a> {
self.local_endpoint,
self.remote_endpoint
);
self.abort();
return Err(Error::Dropped);
}
// ACK in the SYN-RECEIVED state must have the exact ACK number, or we RST it.
@ -3479,7 +3478,7 @@ mod test {
},
Err(Error::Dropped)
);
assert_eq!(s.state, State::Closed);
assert_eq!(s.state, State::SynSent);
}
#[test]