From 05ff141e83ff41328a8a0a890424f50e8c3029b5 Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Wed, 25 Sep 2024 20:29:26 +0300 Subject: [PATCH] buffers: fix max headroom size Commit 5acb8f0 ("Implement DATA_V3 protocol features") has added support for 64bit pkitd. This means that headroom for TX buffer should be also increased by 4 bytes. Signed-off-by: Lev Stipakov --- bufferpool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bufferpool.cpp b/bufferpool.cpp index e6687c9..d1653ff 100644 --- a/bufferpool.cpp +++ b/bufferpool.cpp @@ -27,7 +27,7 @@ #include "bufferpool.h" #include "trace.h" -#define OVPN_BUFFER_HEADROOM 26 // we prepend TCP packet size (2 bytes) and crypto overhead (24 bytes) +#define OVPN_BUFFER_HEADROOM 30 // we prepend TCP packet size (2 bytes) and max crypto overhead (28 bytes) // good enough limit for in-flight packets constexpr auto MAX_POOL_SIZE = 100'000;