From 0f754c44a001958c26c0f32017e8a0a166e57620 Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Sun, 8 Dec 2024 20:12:45 +0100 Subject: [PATCH] Fix rare connectivity issues by switching to the minimal IPv4 MTU. progress towards #819 --- src/network.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.zig b/src/network.zig index 3aff027e..d3394ff9 100644 --- a/src/network.zig +++ b/src/network.zig @@ -1199,7 +1199,7 @@ pub const Protocols = struct { pub const Connection = struct { // MARK: Connection const maxPacketSize: u32 = 65507; // max udp packet size const importantHeaderSize: u32 = 5; - const maxImportantPacketSize: u32 = 1500 - 14 - 20 - 8; // Ethernet MTU minus Ethernet header minus IP header minus udp header + const maxImportantPacketSize: u32 = 576 - 20 - 8; // IPv4 MTU minus IP header minus udp header const headerOverhead = 20 + 8 + 42; // IP Header + UDP Header + Ethernet header/footer const congestionControl_historySize = 16; const congestionControl_historyMask = congestionControl_historySize - 1;