cableguard / altuntun

Userspace Implementation of Wireguard in Rust
https://cableguard.org
BSD 3-Clause "New" or "Revised" License
54 stars 4 forks source link

Error: source slice length (4) does not match destination slice length (1) #4

Open HomoSapiens opened 1 month ago

HomoSapiens commented 1 month ago

Hello.

Please explain to me why did you commit this https://github.com/cableguard/altuntun/commit/51b25cdc5c6d2d0499baaec04d005237d33eb7cf ?

I use your library in project and there is a error when I receiving the first handshake:

thread 'main' panicked at /app/altuntun/altuntun/src/noise/handshake.rs:844:22:
source slice length (4) does not match destination slice length (1)

AFAIK type MessageType = u32; - is 4 bytes and you try copy 4-bytes &super::NP_HANDSHAKE_RESP.to_le_bytes() to 1-byte slice message_type

cableguard commented 1 month ago

Hi,

From what you are saying, I understand you created a tunnel but it quickly failed. Can you please share the full configuration you used so I can reproduce the issue?

Thanks