From: Felix Fietkau Date: Wed, 31 May 2023 08:41:16 +0000 (+0200) Subject: wg-linux: increase default messages size X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7d3986b7a5a20b9af0dacd053b2657210385e7bb;p=project%2Funetd.git wg-linux: increase default messages size Makes the need for splitting messages less likely Signed-off-by: Felix Fietkau --- 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 *