From 63a4beed6ec2cee090c3d5acf7bf4b300ad8dfbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kub=C3=ADk?= Date: Tue, 26 Sep 2023 16:10:13 +0200 Subject: [PATCH] fix(client): fetch maximum datagram size after TUN read --- src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.rs b/src/client.rs index 8d24ebb..70662ce 100644 --- a/src/client.rs +++ b/src/client.rs @@ -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 {}",