diff options
author | Arne Schwabe | 2022-01-24 03:54:59 +0100 |
---|---|---|
committer | Gert Doering | 2022-02-02 14:11:00 +0100 |
commit | 65a21eb14f4afd80864e88ff425f5d9ef8d8fdec (patch) | |
tree | 1d7d31db1464cbf3f7eacf082a2a5999315b1c05 /src/openvpn/multi.c | |
parent | 5b3c8ca869766de2c94eb7dd4450b0d9ab1c75fc (diff) | |
download | openvpn-65a21eb14f4afd80864e88ff425f5d9ef8d8fdec.zip openvpn-65a21eb14f4afd80864e88ff425f5d9ef8d8fdec.tar.gz |
Change buffer allocation calculation and checks to be more static
Currently we use half dynamic buffer sizes where we use have a fixed
overhead for crypto (crypto_max_overhead) but use a dynamic overhead
for the the other small header sizes.
Patch v3: rebase
Patch v4: add size of ack array to control channel frame size
Patch v5: fix calculation of compression overhead calculated over 0 instead
of payload size
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220124025459.1042317-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23638.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/multi.c')
-rw-r--r-- | src/openvpn/multi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 0886a0a..42aff67 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3495,7 +3495,7 @@ gremlin_flood_clients(struct multi_context *m) int i; ASSERT(buf_init(&buf, FRAME_HEADROOM(&m->top.c2.frame))); - parm.packet_size = min_int(parm.packet_size, MAX_RW_SIZE_TUN(&m->top.c2.frame)); + parm.packet_size = min_int(parm.packet_size, m->top.c2.frame.buf.payload_size); msg(D_GREMLIN, "GREMLIN_FLOOD_CLIENTS: flooding clients with %d packets of size %d", parm.n_packets, @@ -3557,7 +3557,7 @@ multi_process_per_second_timers_dowork(struct multi_context *m) } void -multi_top_init(struct multi_context *m, const struct context *top) +multi_top_init(struct multi_context *m, struct context *top) { inherit_context_top(&m->top, top); m->top.c2.buffers = init_context_buffers(&top->c2.frame); |