timestamp as payload

This commit is contained in:
Simon Wicky
2023-09-06 09:49:12 +02:00
parent 13b0a236d7
commit 2c70801bcc
+3 -2
View File
@@ -97,8 +97,9 @@ impl WireGuardStream {
let (msg, address) = self.recv_wg_msg().await?;
println!("Rcv: {:?}", msg);
//let mut buf = vec![0u8; MAXMSGLEN];
handshake.read_message_no_payload(&msg[8..88])?;
let mut buf = vec![0u8; MAXMSGLEN];
let len = handshake.read_message(&msg[8..116], &mut buf)?;
println!("Timestamp : {:?} : {:?}", len, &buf[..len]);
Ok((msg[4..8].try_into().unwrap(), address))
}