add more debug info
This commit is contained in:
parent
14f9745aa9
commit
614e17d2d5
3 changed files with 2 additions and 1 deletions
|
|
@ -40,7 +40,6 @@ pub async fn daemon_main() -> Result<()> {
|
||||||
let (commands_tx, commands_rx) = async_channel::unbounded();
|
let (commands_tx, commands_rx) = async_channel::unbounded();
|
||||||
let (response_tx, response_rx) = async_channel::unbounded();
|
let (response_tx, response_rx) = async_channel::unbounded();
|
||||||
let mut inst = DaemonInstance::new(commands_rx, response_tx);
|
let mut inst = DaemonInstance::new(commands_rx, response_tx);
|
||||||
// tokio::try_join!(inst.run(), listen(commands_tx, response_rx)).map(|_| ())
|
|
||||||
|
|
||||||
let mut _tun = tun::TunInterface::new()?;
|
let mut _tun = tun::TunInterface::new()?;
|
||||||
_tun.set_ipv4_addr(Ipv4Addr::from([192, 168, 1, 10]))?;
|
_tun.set_ipv4_addr(Ipv4Addr::from([192, 168, 1, 10]))?;
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,7 @@ fn aead_chacha20_open(
|
||||||
nonce[4..].copy_from_slice(&counter.to_le_bytes());
|
nonce[4..].copy_from_slice(&counter.to_le_bytes());
|
||||||
|
|
||||||
log::debug!("TAG A");
|
log::debug!("TAG A");
|
||||||
|
log::debug!("{:?};{:?};{:?};{:?};{}", key, data, aad, nonce, counter);
|
||||||
|
|
||||||
aead_chacha20_open_inner(buffer, key, nonce, data, aad)
|
aead_chacha20_open_inner(buffer, key, nonce, data, aad)
|
||||||
.map_err(|_| WireGuardError::InvalidAeadTag)?;
|
.map_err(|_| WireGuardError::InvalidAeadTag)?;
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ impl PeerPcb {
|
||||||
}
|
}
|
||||||
TunnResult::WriteToNetwork(packet) => {
|
TunnResult::WriteToNetwork(packet) => {
|
||||||
let socket = self.socket().await?;
|
let socket = self.socket().await?;
|
||||||
|
tracing::debug!("Our Encapsulated packet: {:?}", packet);
|
||||||
socket.send(packet).await?;
|
socket.send(packet).await?;
|
||||||
}
|
}
|
||||||
_ => panic!("Unexpected result from encapsulate"),
|
_ => panic!("Unexpected result from encapsulate"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue