We were responding to these packets until now, causing data (or other) packets to be sent "in the middle of" a rekey
OQZGSEWMQXOSEDB6ACSY7NTNZYIYX4ECZWXJ6JD5I7FC64JHTLIQC
J4ZEHJHG4NGTGJPU5YMBW7IRTVZ7WOHIWI45FGM3Q3A7JHDTTXQAC
662ZS5JF3ZA4HV65PNPWQJXXTU34WQE3AUN5CBHRLJHMUJMSDPTAC
7FRJYUI62VW257VVFQXND6OKSAILVTHGEJCXFE6CG6FIOIUTDVYAC
2WEO7OZLWJJPUYK4WXLT5FD46G2MAEIHEYMDW5GASCBUNKOPXCVAC
pub(crate) pending_reads: Vec<CryptoVec>,
pending_reads: Vec::new(),
let instant = tokio::time::Instant::now() + self.common.config.auth_rejection_time;
self.flush()?;
let mut pending = std::mem::replace(&mut self.pending_reads, Vec::new()); for p in pending.drain(..) { self = self.process_packet(handler, &p).await? } self.pending_reads = pending;
let mut pending = std::mem::replace(&mut self.pending_reads, Vec::new());
for p in pending.drain(..) {
self = self.process_packet(handler, &p).await?
}
self.pending_reads = pending;
rek => enc.rekey = rek,
Some(Kex::KexInit(k)) => { enc.rekey = Some(Kex::KexInit(k)); self.pending_reads.push(CryptoVec::from_slice(buf)); return Ok(self); } rek => { debug!("rek = {:?}", rek); enc.rekey = rek },
Some(Kex::KexInit(k)) => {
enc.rekey = Some(Kex::KexInit(k));
self.pending_reads.push(CryptoVec::from_slice(buf));
return Ok(self);
rek => {
debug!("rek = {:?}", rek);
enc.rekey = rek
},
self.process_packet(handler, buf).await }
self.process_packet(handler, buf).await
async fn process_packet<H: Handler>( mut self, handler: &mut Option<H>, buf: &[u8], ) -> Result<Self, H::Error> { let instant = tokio::time::Instant::now() + self.common.config.auth_rejection_time; let mut enc = self.common.encrypted.as_mut().unwrap();
async fn process_packet<H: Handler>(
mut self,
handler: &mut Option<H>,
buf: &[u8],
) -> Result<Self, H::Error> {
let mut enc = self.common.encrypted.as_mut().unwrap();
pending_reads: Vec<CryptoVec>,
let mut pending = std::mem::replace(&mut self.pending_reads, Vec::new()); for p in pending.drain(..) { self = self.process_packet(client, &p).await? } self.pending_reads = pending;
self = self.process_packet(client, &p).await?
return Ok(self); } Some(Kex::KexInit(k)) => { enc.rekey = Some(Kex::KexInit(k)); self.pending_reads.push(CryptoVec::from_slice(buf));
self.process_packet(client, buf).await }
self.process_packet(client, buf).await
async fn process_packet<H: super::Handler>( mut self, client: &mut Option<H>, buf: &[u8], ) -> Result<Self, H::Error> {
async fn process_packet<H: super::Handler>(
client: &mut Option<H>,
version = "0.33.2"
version = "0.33.3"