From 7d3986b7a5a20b9af0dacd053b2657210385e7bb Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 31 May 2023 10:41:16 +0200 Subject: [PATCH] wg-linux: increase default messages size Makes the need for splitting messages less likely Signed-off-by: Felix Fietkau --- wg-linux.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wg-linux.c b/wg-linux.c index 35365e5..0a17c90 100644 --- a/wg-linux.c +++ b/wg-linux.c @@ -44,10 +44,19 @@ static struct unl unl; static int wg_nl_init(void) { + int ret; + if (unl.sock) return 0; - return unl_genl_init(&unl, "wireguard"); + ret = unl_genl_init(&unl, "wireguard"); + if (ret) + return ret; + + nl_socket_set_buffer_size(unl.sock, 32768, 32768); + nlmsg_set_default_size(32768); + + return 0; } static struct nl_msg * -- 2.30.2