Flush pending packets after a key re-exchange
Dependencies
- [2]
T2FSTMJOFixing a rekey loop - [3]
7FRJYUI6Reboot because of a bad change - [4]
2WEO7OZLVersion updates: getting rid of anyhow + moving to Tokio 1.0 - [5]
EXXUR33QFixing queues when sending a vector - [6]
F2FHFNIKFixing the return value of session::data_noqueue
Change contents
- edit in thrussh/src/session.rs at line 196
pub fn flush_all_pending(&mut self) {for (_, channel) in self.channels.iter_mut() {while let Some((buf, a, from)) = channel.pending_data.pop_front() {let size = Self::data_noqueue(&mut self.write, channel, &buf, from);if from + size < buf.len() {channel.pending_data.push_front((buf, a, from + size));break;}}}} - replacement in thrussh/src/session.rs at line 255
if !channel.pending_data.is_empty() {if !channel.pending_data.is_empty() || self.rekey.is_some() { - replacement in thrussh/src/server/encrypted.rs at line 36
debug!("read_encrypted");debug!("server_read_encrypted, buf = {:?}",&buf[..buf.len().min(20)]); - edit in thrussh/src/server/encrypted.rs at line 67
self.flush()?; - edit in thrussh/src/server/encrypted.rs at line 79
self.flush()?; - edit in thrussh/src/server/encrypted.rs at line 88
- edit in thrussh/src/server/encrypted.rs at line 90
enc.flush_all_pending(); - edit in thrussh/src/server/encrypted.rs at line 92
self.flush()?; - replacement in thrussh/src/client/encrypted.rs at line 40
&buf[..buf.len().min(100)]&buf[..buf.len().min(20)] - edit in thrussh/src/client/encrypted.rs at line 71
self.flush()?; - edit in thrussh/src/client/encrypted.rs at line 104
enc.flush_all_pending(); - edit in thrussh/src/client/encrypted.rs at line 106
self.flush()?;