Skip to content

Commit

Permalink
fix(client): fetch maximum datagram size after TUN read
Browse files Browse the repository at this point in the history
  • Loading branch information
M0dEx committed Sep 26, 2023
1 parent b5ad2fe commit 63a4bee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ impl QuincyClient {
debug!("Started outgoing traffic task (interface -> QUIC tunnel)");

loop {
let data = read_from_interface(&mut read_interface, interface_mtu).await?;

let quinn_mtu = connection
.max_datagram_size()
.ok_or_else(|| anyhow!("The Quincy server does not support datagram transfer"))?;

let data = read_from_interface(&mut read_interface, interface_mtu).await?;

if data.len() > quinn_mtu {
warn!(
"Dropping packet of size {} due to maximum datagram size being {}",
Expand Down

0 comments on commit 63a4bee

Please sign in to comment.